[Bf-blender-cvs] [304e5541cb6] master: Fix T52208: Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender.

Bastien Montagne noreply at git.blender.org
Fri Jul 28 10:40:23 CEST 2017


Commit: 304e5541cb6d2874ccca7871d6af295ea073c31a
Author: Bastien Montagne
Date:   Fri Jul 28 10:38:47 2017 +0200
Branches: master
https://developer.blender.org/rB304e5541cb6d2874ccca7871d6af295ea073c31a

Fix T52208: Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender.

but pointer was not assigned in that case...

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

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

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

diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 99868294a2e..b21dd8112b5 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -702,7 +702,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
 		              WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL);
 	}
 	else if (flag & UI_ITEM_R_EVENT) {
-		uiDefButR_prop(block, UI_BTYPE_KEY_EVENT, 0, name, x, y, w, h, ptr, prop, index, 0, 0, -1, -1, NULL);
+		but = uiDefButR_prop(block, UI_BTYPE_KEY_EVENT, 0, name, x, y, w, h, ptr, prop, index, 0, 0, -1, -1, NULL);
 	}
 	else if (flag & UI_ITEM_R_FULL_EVENT) {
 		if (RNA_struct_is_a(ptr->type, &RNA_KeyMapItem)) {




More information about the Bf-blender-cvs mailing list