correct sloppy NULL checks, in interface code:

- uiPupMenuBegin was checking for NULL title but would still crash if it were NULL.
- now tag the function as 'nonnull' and remove NULL checks. make sure NULL isnt passed to it.
This commit is contained in:
2013-07-27 14:17:20 +00:00
parent 6aa001f48d
commit d7ff7ad3e9
3 changed files with 9 additions and 7 deletions

View File

@@ -327,7 +327,11 @@ typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event);
typedef struct uiPopupMenu uiPopupMenu;
struct uiPopupMenu *uiPupMenuBegin(struct bContext *C, const char *title, int icon);
struct uiPopupMenu *uiPupMenuBegin(struct bContext *C, const char *title, int icon)
#ifdef __GNUC__
__attribute__((nonnull))
#endif
;
void uiPupMenuEnd(struct bContext *C, struct uiPopupMenu *head);
struct uiLayout *uiPupMenuLayout(uiPopupMenu *head);