[Bf-blender-cvs] [b3478930d89] blender2.8: Fix crash adding workspace

Campbell Barton noreply at git.blender.org
Tue Oct 30 00:28:28 CET 2018


Commit: b3478930d895a610534e6b1ef3eeb105e43f5834
Author: Campbell Barton
Date:   Tue Oct 30 10:25:05 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBb3478930d895a610534e6b1ef3eeb105e43f5834

Fix crash adding workspace

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 43787abd352..fffc28d1cdf 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3883,9 +3883,10 @@ static bool ui_but_is_mouse_over_icon_extra(const ARegion *region, uiBut *but, c
 static int ui_do_but_TAB(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
 {
 	if (data->state == BUTTON_STATE_HIGHLIGHT) {
-		const int rna_type = RNA_property_type(but->rnaprop);
+		const int rna_type = but->rnaprop ? RNA_property_type(but->rnaprop) : 0;
 
-		if (ELEM(rna_type, PROP_POINTER, PROP_STRING) &&
+		if (but->rnaprop &&
+		    ELEM(rna_type, PROP_POINTER, PROP_STRING) &&
 		    (but->custom_data != NULL) &&
 		    (event->type == LEFTMOUSE) &&
 		    ((event->val == KM_DBL_CLICK) || event->ctrl))



More information about the Bf-blender-cvs mailing list