summaryrefslogtreecommitdiffstats
path: root/src/ui/interface.cpp
diff options
context:
space:
mode:
authorKris <Kris.DeGussem@gmail.com>2015-11-16 23:01:01 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-11-16 23:01:01 +0000
commit3cba8f187c62aa552277ad51ab2e2c916a94b6ee (patch)
treee7f341865c65a6c4d2dcf38ea7dcb2a946be4157 /src/ui/interface.cpp
parentremoves warnings when compiling with c++11 using uniqueptr instead of autoptr (diff)
parentnull pointer dereference fix (diff)
downloadinkscape-3cba8f187c62aa552277ad51ab2e2c916a94b6ee.tar.gz
inkscape-3cba8f187c62aa552277ad51ab2e2c916a94b6ee.zip
Fix potentential null pointer dereference
(bzr r14476)
Diffstat (limited to 'src/ui/interface.cpp')
-rw-r--r--src/ui/interface.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index 9a4e1d773..0f719b40f 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -846,13 +846,11 @@ static void sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, I
#endif
}
} else if (menu_pntr->attribute("check") != NULL) {
- SPAction *action = NULL;
if (verb->get_code() != SP_VERB_NONE) {
- action = verb->get_action(Inkscape::ActionContext(view));
- }
- sp_ui_menu_append_check_item_from_verb(GTK_MENU(menu), view, action->name, action->tip, NULL,
+ SPAction *action = verb->get_action(Inkscape::ActionContext(view));
+ sp_ui_menu_append_check_item_from_verb(GTK_MENU(menu), view, action->name, action->tip, NULL,
checkitem_toggled, checkitem_update, verb);
-
+ }
} else {
sp_ui_menu_append_item_from_verb(GTK_MENU(menu), verb, view);
group = NULL;