Fix (unreported): Crash if a right click is performed on an image datablock (open btn f.e.).
Only access/insert the button_pointer if it's not null...
This commit is contained in:
parent
4d38932cb4
commit
894513c7fd
|
@ -7012,7 +7012,8 @@ static bool ui_but_menu(bContext *C, uiBut *but)
|
|||
}
|
||||
|
||||
/* Set the operator pointer for python access */
|
||||
uiLayoutSetContextPointer(layout,"button_operator", but->opptr);
|
||||
if (but->opptr)
|
||||
uiLayoutSetContextPointer(layout,"button_operator", but->opptr);
|
||||
|
||||
uiItemS(layout);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue