diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-26 23:08:02 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-02-26 23:12:56 +0300 |
commit | 6dabcdf69e7e733d872ae745614dae6e9e263a2c (patch) | |
tree | 11751e1959830120c5f767b83f2960495b93df51 /source/blender/draw | |
parent | 712530eb9321f233694eeb49a10e1c916576b153 (diff) |
Clay Engine: Replace if() by assert()
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 88ac5081359..4e8f9bc4306 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -474,14 +474,14 @@ void DRW_shgroup_free(struct DRWShadingGroup *shgroup) void DRW_shgroup_call_add(DRWShadingGroup *shgroup, Batch *geom, float (*obmat)[4]) { - if (geom) { - DRWCall *call = MEM_callocN(sizeof(DRWCall), "DRWCall"); + BLI_assert(geom != NULL); - call->obmat = obmat; - call->geometry = geom; + DRWCall *call = MEM_callocN(sizeof(DRWCall), "DRWCall"); - BLI_addtail(&shgroup->calls, call); - } + call->obmat = obmat; + call->geometry = geom; + + BLI_addtail(&shgroup->calls, call); } void DRW_shgroup_dynamic_call_add(DRWShadingGroup *shgroup, ...) |