[Bf-blender-cvs] [f0b72a776ed] master: Fix T66706: crash in viewport shading popover for workbench engine
Brecht Van Lommel
noreply at git.blender.org
Thu Jul 11 15:10:38 CEST 2019
Commit: f0b72a776ed888da798b41ce43995f7b5ac11ec0
Author: Brecht Van Lommel
Date: Thu Jul 11 14:13:22 2019 +0200
Branches: master
https://developer.blender.org/rBf0b72a776ed888da798b41ce43995f7b5ac11ec0
Fix T66706: crash in viewport shading popover for workbench engine
Differential Revision: https://developer.blender.org/D5226
===================================================================
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 1c76753fb1b..2ba5e2ae68c 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1067,11 +1067,7 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUS
int totitem = 0;
- if (shading->type == OB_SOLID) {
- r_free = false;
- return rna_enum_shading_color_type_items;
- }
- else if (shading->type == OB_WIRE) {
+ if (shading->type == OB_WIRE) {
EnumPropertyItem *item = NULL;
RNA_enum_items_add_value(
&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;
}
else {
- *r_free = false;
- return NULL;
+ /* Solid mode, or lookdev mode for workbench engine. */
+ r_free = false;
+ return rna_enum_shading_color_type_items;
}
}
More information about the Bf-blender-cvs
mailing list