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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user