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

but pointer was not assigned in that case...
This commit is contained in:
Bastien Montagne 2017-07-28 10:38:47 +02:00
parent c694f6e3fa
commit 304e5541cb
Notes: blender-bot 2023-02-14 06:45:13 +01:00
Referenced by issue #52208, Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {