Fix: Button's label can be NULL
This commit is contained in:
@@ -3913,7 +3913,7 @@ uiBut *uiDefIconTextButO_ptr(uiBlock *block, int type, wmOperatorType *ot, int o
|
|||||||
uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
|
uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
|
||||||
{
|
{
|
||||||
wmOperatorType *ot = WM_operatortype_find(opname, 0);
|
wmOperatorType *ot = WM_operatortype_find(opname, 0);
|
||||||
if (str[0] == '\0')
|
if (str && str[0] == '\0')
|
||||||
return uiDefIconButO_ptr(block, type, ot, opcontext, icon, x, y, width, height, tip);
|
return uiDefIconButO_ptr(block, type, ot, opcontext, icon, x, y, width, height, tip);
|
||||||
return uiDefIconTextButO_ptr(block, type, ot, opcontext, icon, str, x, y, width, height, tip);
|
return uiDefIconTextButO_ptr(block, type, ot, opcontext, icon, str, x, y, width, height, tip);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user