diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-04-02 05:45:11 +0000 |
|---|---|---|
| committer | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-04-02 05:48:42 +0000 |
| commit | 0e2aefcd2aa93b4da58c87692d999252e141f17b (patch) | |
| tree | ec7ccc06fb445911e093095cb232cfb3d256c4f3 /src/live_effects | |
| parent | Add fixes to icons pointed in RocketChat. Thanks Adam Belis (diff) | |
| download | inkscape-0e2aefcd2aa93b4da58c87692d999252e141f17b.tar.gz inkscape-0e2aefcd2aa93b4da58c87692d999252e141f17b.zip | |
Avoid crash from nullptr exception
Adds exception handling for HiddenParam::param_newWidget()
which always returns a nullptr.
Fixes https://gitlab.com/inkscape/inkscape/issues/167
Diffstat (limited to 'src/live_effects')
| -rw-r--r-- | src/live_effects/effect.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 0c027a57f..07081286a 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -1488,13 +1488,13 @@ Effect::newWidget() if ((*it)->widget_is_visible) { Parameter * param = *it; Gtk::Widget * widg = param->param_newWidget(); - if (param->widget_is_enabled) { - widg->set_sensitive(true); - } else { - widg->set_sensitive(false); - } Glib::ustring * tip = param->param_getTooltip(); if (widg) { + if (param->widget_is_enabled) { + widg->set_sensitive(true); + } else { + widg->set_sensitive(false); + } vbox->pack_start(*widg, true, true, 2); if (tip) { widg->set_tooltip_text(*tip); |
