From 2b97a250f6840ff8397375018e65bc9e09d386da Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 25 Nov 2018 18:36:43 +0100 Subject: Cleanup: remove useless redundant NULL check. --- source/blender/draw/modes/object_mode.c | 45 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'source/blender/draw') diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index c794ae3c433..e9455a843f5 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -2379,31 +2379,30 @@ static void DRW_shgroup_texture_space(OBJECT_ShadingGroupList *sgl, Object *ob, ID *ob_data = ob->data; float *texcoloc = NULL; float *texcosize = NULL; - if (ob->data != NULL) { - switch (GS(ob_data->name)) { - case ID_ME: - BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, NULL, &texcosize); - break; - case ID_CU: - { - Curve *cu = (Curve *)ob_data; - if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) { - BKE_curve_texspace_calc(cu); - } - texcoloc = cu->loc; - texcosize = cu->size; - break; - } - case ID_MB: - { - MetaBall *mb = (MetaBall *)ob_data; - texcoloc = mb->loc; - texcosize = mb->size; - break; + + switch (GS(ob_data->name)) { + case ID_ME: + BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, NULL, &texcosize); + break; + case ID_CU: + { + Curve *cu = (Curve *)ob_data; + if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) { + BKE_curve_texspace_calc(cu); } - default: - BLI_assert(0); + texcoloc = cu->loc; + texcosize = cu->size; + break; } + case ID_MB: + { + MetaBall *mb = (MetaBall *)ob_data; + texcoloc = mb->loc; + texcosize = mb->size; + break; + } + default: + BLI_assert(0); } float tmp[4][4] = {{0.0f}}, one = 1.0f; -- cgit v1.2.3