[Bf-blender-cvs] [2b97a250f68] blender2.8: Cleanup: remove useless redundant NULL check.
Bastien Montagne
noreply at git.blender.org
Sun Nov 25 18:50:10 CET 2018
Commit: 2b97a250f6840ff8397375018e65bc9e09d386da
Author: Bastien Montagne
Date: Sun Nov 25 18:36:43 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB2b97a250f6840ff8397375018e65bc9e09d386da
Cleanup: remove useless redundant NULL check.
===================================================================
M source/blender/draw/modes/object_mode.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list