[ekiga/ds-gtk-application] GActorMenu: Handle gracefully menus with no Actions.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gtk-application] GActorMenu: Handle gracefully menus with no Actions.
- Date: Sun, 7 Dec 2014 16:29:37 +0000 (UTC)
commit d64683bce842377760835ecb42fab6c590cae4de
Author: Damien Sandras <dsandras seconix com>
Date: Sun Dec 7 17:27:36 2014 +0100
GActorMenu: Handle gracefully menus with no Actions.
lib/engine/gui/gtk-core/gactor-menu.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/gui/gtk-core/gactor-menu.cpp b/lib/engine/gui/gtk-core/gactor-menu.cpp
index dafe719..b844f7a 100644
--- a/lib/engine/gui/gtk-core/gactor-menu.cpp
+++ b/lib/engine/gui/gtk-core/gactor-menu.cpp
@@ -119,7 +119,12 @@ Ekiga::GActorMenu::get_model (const Ekiga::GActorMenuStore & store,
GtkWidget *
Ekiga::GActorMenu::get_menu (const Ekiga::GActorMenuStore & store)
{
- GtkWidget *menu = gtk_menu_new_from_model (get_model (store, false));
+ GMenuModel *model = get_model (store, false);
+
+ if (!model)
+ return NULL;
+
+ GtkWidget *menu = gtk_menu_new_from_model (model);
gtk_widget_insert_action_group (menu, "win", G_ACTION_GROUP (g_application_get_default ()));
g_object_ref (menu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]