Cleanup: remove useless redundant NULL check.

This commit is contained in:
Bastien Montagne
2018-11-25 18:36:43 +01:00
parent 5f6fae9ad0
commit 2b97a250f6

View File

@@ -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;
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);
}
case ID_MB:
{
MetaBall *mb = (MetaBall *)ob_data;
texcoloc = mb->loc;
texcosize = mb->size;
break;
}
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;