diff options
| author | Kris <Kris.DeGussem@gmail.com> | 2015-11-16 23:01:01 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-11-16 23:01:01 +0000 |
| commit | 3cba8f187c62aa552277ad51ab2e2c916a94b6ee (patch) | |
| tree | e7f341865c65a6c4d2dcf38ea7dcb2a946be4157 /src/ui/interface.cpp | |
| parent | removes warnings when compiling with c++11 using uniqueptr instead of autoptr (diff) | |
| parent | null pointer dereference fix (diff) | |
| download | inkscape-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.cpp | 8 |
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; |
