diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 01:47:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 01:47:23 +0300 |
commit | c1d29ea7835c0f2ebd20531dfe3996c6bbce6b58 (patch) | |
tree | d7854c52ba16975cb31910bfd5ad041b1ed71213 /source/blender/windowmanager/intern/wm_menu_type.c | |
parent | a5a86f39212fb16c8310d8eca67ccecc4c6f7dd7 (diff) |
WM: enforce descriptions being NULL or defined
Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_menu_type.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_menu_type.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_menu_type.c b/source/blender/windowmanager/intern/wm_menu_type.c index 58e85716bf1..4e71001990d 100644 --- a/source/blender/windowmanager/intern/wm_menu_type.c +++ b/source/blender/windowmanager/intern/wm_menu_type.c @@ -60,6 +60,7 @@ MenuType *WM_menutype_find(const char *idname, bool quiet) bool WM_menutype_add(MenuType *mt) { + BLI_assert((mt->description == NULL) || (mt->description[0])); BLI_ghash_insert(menutypes_hash, mt->idname, mt); return true; } |