aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-26 14:15:26 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-26 14:15:26 +0100
commitd29165bbb95aef86aeb9d9d9668d035b4430769f (patch)
tree031f29761205f26b540782d42b692165d0ad3f2c /src/ft_draw_sprite.c
parenttab (diff)
download42-cub3d-d29165bbb95aef86aeb9d9d9668d035b4430769f.tar.gz
42-cub3d-d29165bbb95aef86aeb9d9d9668d035b4430769f.tar.bz2
42-cub3d-d29165bbb95aef86aeb9d9d9668d035b4430769f.tar.xz
42-cub3d-d29165bbb95aef86aeb9d9d9668d035b4430769f.tar.zst
42-cub3d-d29165bbb95aef86aeb9d9d9668d035b4430769f.zip
Cool malloc
Diffstat (limited to 'src/ft_draw_sprite.c')
-rw-r--r--src/ft_draw_sprite.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c
index 0c5a8b2..423080d 100644
--- a/src/ft_draw_sprite.c
+++ b/src/ft_draw_sprite.c
@@ -41,7 +41,8 @@ void
{
float **dist_tab;
- ft_alloc_dist_tab(&dist_tab, cl);
+ if (!(dist_tab = ft_alloc_dist_tab()))
+ ft_error(FT_RET_ALLOC_ERR, FT_ERR_ALLOCATE, cl);
while (++jt < cl->mlist.sprite_var)
{
while (++it < cl->mlist.sprite_nbr[jt])