[rhythmbox] shell: Fix crash when menu doesn't exist



commit 396e6b510e356d0575bfd9e9819b20b0ada683ef
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jun 9 16:21:09 2016 +0200

    shell: Fix crash when menu doesn't exist
    
     #0  0x00007fffef7db4a5 in g_menu_model_get_n_items (model=0x0) at gmenumodel.c:493
     #1  0x00007ffff7aa07b1 in rb_application_link_shared_menus (app=0x628840, menu=0x0) at 
/jhbuild/rhythmbox/shell/rb-application.c:778
     #2  0x00007fffca9c6444 in rb_iradio_source_new (shell=0x8df1b0, plugin=0x1172a50) at 
/jhbuild/rhythmbox/plugins/iradio/rb-iradio-source.c:458
     #3  0x00007fffca9c523a in impl_activate (plugin=0x1172a50) at 
/jhbuild/rhythmbox/plugins/iradio/rb-iradio-plugin.c:89
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767456

 shell/rb-application.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/shell/rb-application.c b/shell/rb-application.c
index 76b0ae9..2b922b3 100644
--- a/shell/rb-application.c
+++ b/shell/rb-application.c
@@ -775,6 +775,8 @@ rb_application_link_shared_menus (RBApplication *app, GMenu *menu)
 {
        int i;
 
+       g_return_if_fail (menu != NULL);
+
        for (i = 0; i < g_menu_model_get_n_items (G_MENU_MODEL (menu)); i++) {
                GMenuModel *symlink_menu;
                GMenuLinkIter *iter;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]