Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-11-25 20:36:43 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-11-25 20:49:57 +0300
commit2b97a250f6840ff8397375018e65bc9e09d386da (patch)
treeb5aafc82d68d4efa9785c035f3fc9cc2c8a28158 /source/blender/draw
parent5f6fae9ad0bdb4184fb430d533dbbdec9c3da67f (diff)
Cleanup: remove useless redundant NULL check.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/modes/object_mode.c45
1 files changed, 22 insertions, 23 deletions
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;