summaryrefslogtreecommitdiffstats
path: root/src/interface.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-03-05 18:57:17 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-03-05 18:57:17 +0000
commit208407c7507285f2c988504c88f998dd9d6d07d9 (patch)
tree8fb727e659dc8e909f329af364c0163c4f06c02c /src/interface.cpp
parentextensions. hpgl output. further patch by TimeWaster (Bug 1118663) (diff)
downloadinkscape-208407c7507285f2c988504c88f998dd9d6d07d9.tar.gz
inkscape-208407c7507285f2c988504c88f998dd9d6d07d9.zip
Added null check (should fix Bug #1051017 )
(bzr r12175)
Diffstat (limited to 'src/interface.cpp')
-rw-r--r--src/interface.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index 284368bff..bf497b407 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -1539,14 +1539,16 @@ sp_ui_menu_item_set_name(GtkWidget *data, Glib::ustring const &name)
//- a GtkHBox, whose first child is a label displaying name if the menu
//item has an accel key
//- a GtkLabel if the menu has no accel key
- if (GTK_IS_LABEL(child)) {
- gtk_label_set_markup_with_mnemonic(GTK_LABEL (child), name.c_str());
- } else if (GTK_IS_HBOX(child)) {
- gtk_label_set_markup_with_mnemonic(
- GTK_LABEL (gtk_container_get_children(GTK_CONTAINER (child))->data),
- name.c_str());
- }//else sp_ui_menu_append_item_from_verb has been modified and can set
- //a menu item in yet another way...
+ if (child != NULL){
+ if (GTK_IS_LABEL(child)) {
+ gtk_label_set_markup_with_mnemonic(GTK_LABEL (child), name.c_str());
+ } else if (GTK_IS_HBOX(child)) {
+ gtk_label_set_markup_with_mnemonic(
+ GTK_LABEL (gtk_container_get_children(GTK_CONTAINER (child))->data),
+ name.c_str());
+ }//else sp_ui_menu_append_item_from_verb has been modified and can set
+ //a menu item in yet another way...
+ }
}
}