Fix T66706: crash in viewport shading popover for workbench engine
Differential Revision: https://developer.blender.org/D5226
This commit is contained in:
parent
8a1552545a
commit
f0b72a776e
@ -1067,11 +1067,7 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUS
|
|||||||
|
|
||||||
int totitem = 0;
|
int totitem = 0;
|
||||||
|
|
||||||
if (shading->type == OB_SOLID) {
|
if (shading->type == OB_WIRE) {
|
||||||
r_free = false;
|
|
||||||
return rna_enum_shading_color_type_items;
|
|
||||||
}
|
|
||||||
else if (shading->type == OB_WIRE) {
|
|
||||||
EnumPropertyItem *item = NULL;
|
EnumPropertyItem *item = NULL;
|
||||||
RNA_enum_items_add_value(
|
RNA_enum_items_add_value(
|
||||||
&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_SINGLE_COLOR);
|
&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_SINGLE_COLOR);
|
||||||
@ -1084,8 +1080,9 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUS
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*r_free = false;
|
/* Solid mode, or lookdev mode for workbench engine. */
|
||||||
return NULL;
|
r_free = false;
|
||||||
|
return rna_enum_shading_color_type_items;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user