summaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-17 19:52:49 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-17 19:54:27 -0700
commit5b56aa1435ddd20e61e5bac515c0a74eb051eca5 (patch)
treee414342b2581e649ea8d082e383f1c2715847153 /macos.c
parent50f6c6d8bccee167dcaa005964af0468535524a3 (diff)
downloadsubsurface-5b56aa1435ddd20e61e5bac515c0a74eb051eca5.tar.gz
Minor Macos menu entry modification fix
We have removed a menu separator from the gtk gui and that was still referenced in the Macos code. And just in case, we are now testing for the widget for the other separator to be non-NULL before destroying it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'macos.c')
-rw-r--r--macos.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/macos.c b/macos.c
index 931d4fa1e..1b7da1ec6 100644
--- a/macos.c
+++ b/macos.c
@@ -98,10 +98,9 @@ void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
gtk_widget_hide (menubar);
gtk_osxapplication_set_menu_bar(osx_app, GTK_MENU_SHELL(menubar));
- sep = gtk_ui_manager_get_widget(ui_manager, "/MainMenu/FileMenu/Separator3");
- gtk_widget_destroy(sep);
sep = gtk_ui_manager_get_widget(ui_manager, "/MainMenu/FileMenu/Separator2");
- gtk_widget_destroy(sep);
+ if (sep)
+ gtk_widget_destroy(sep);
menu_item = gtk_ui_manager_get_widget(ui_manager, "/MainMenu/FileMenu/Quit");
gtk_widget_hide (menu_item);