diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-24 08:15:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-24 08:15:14 +0300 |
commit | c0f161f81148ee664b26f6e8d26c02c63f886356 (patch) | |
tree | 2bf3184a2c982c956fc9a7e10b850e941eeae3d2 /source/blender/editors/interface | |
parent | daa09a4a60086017e75c50c6de0b27fa51232e29 (diff) |
fix [#25776] Crash when operator's bl_idname has more than one dot
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index f6fc5364b81..18bee084f40 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -26,6 +26,7 @@ #include <math.h> #include <stdlib.h> #include <string.h> +#include <assert.h> #include "MEM_guardedalloc.h" @@ -634,7 +635,9 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *idname, const char *name, i but= uiDefIconButO(block, BUT, ot->idname, context, icon, 0, 0, w, UI_UNIT_Y, NULL); else but= uiDefButO(block, BUT, ot->idname, context, name, 0, 0, w, UI_UNIT_Y, NULL); - + + assert(but->optype != NULL); + /* text alignment for toolbar buttons */ if((layout->root->type == UI_LAYOUT_TOOLBAR) && !icon) but->flag |= UI_TEXT_LEFT; |