diff options
author | rbuj <[email protected]> | 2020-12-11 19:33:23 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2020-12-15 07:09:46 +0000 |
commit | 70c7954e5dd48cb2c9a6f27284030d83f75bde5a (patch) | |
tree | 4d6c2e482569a9f64e229cad3c196b952b86e7d6 | |
parent | 374569817b15c9780562b1c893f45653bc188404 (diff) | |
download | mate-panel-70c7954e5dd48cb2c9a6f27284030d83f75bde5a.tar.bz2 mate-panel-70c7954e5dd48cb2c9a6f27284030d83f75bde5a.tar.xz |
applet: Avoid a NULL pointer dereference
-rw-r--r-- | mate-panel/applet.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mate-panel/applet.c b/mate-panel/applet.c index 37cb600a..76a3fb31 100644 --- a/mate-panel/applet.c +++ b/mate-panel/applet.c @@ -643,12 +643,10 @@ applet_show_menu (AppletInfo *info, g_return_if_fail (info != NULL); - panel_widget = mate_panel_applet_get_panel_widget (info); + if ((info->menu == NULL) && ((info->menu = mate_panel_applet_create_menu (info)) == NULL)) + return; - if (info->menu == NULL) { - info->menu = mate_panel_applet_create_menu (info); - g_return_if_fail (info->menu != NULL); - } + panel_widget = mate_panel_applet_get_panel_widget (info); mate_panel_applet_menu_set_recurse (GTK_MENU (info->menu), "menu_panel", |