diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-08-18 00:48:08 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-08-18 00:48:08 +0000 |
| commit | 4ce01e3db6884bde8938fd3eb6e5bd1fff157a13 (patch) | |
| tree | 5b2e8db5101eb6e15e89b2257dfb1e66085df860 /src/widgets | |
| parent | Add function to cancel wait-for-LPE mode in pen context (diff) | |
| download | inkscape-4ce01e3db6884bde8938fd3eb6e5bd1fff157a13.tar.gz inkscape-4ce01e3db6884bde8938fd3eb6e5bd1fff157a13.zip | |
Check whether we are really in LPEToolContext in sp_lpetool_toolbox_sel_changed()
(bzr r6688)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/toolbox.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 90551160f..4bd645158 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -4840,7 +4840,10 @@ sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObject *tbl) { GtkAction* w = GTK_ACTION(g_object_get_data(tbl, "lpetool_line_segment_action")); SPItem *item = selection->singleItem(); - SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(selection->desktop()->event_context); + SPEventContext *ec = selection->desktop()->event_context; + if (!SP_IS_LPETOOL_CONTEXT(ec)) + return; + SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(ec); if (item && SP_IS_LPE_ITEM(item) && lpetool_item_has_construction(lc, item)) { SPLPEItem *lpeitem = SP_LPE_ITEM(item); Effect* lpe = sp_lpe_item_get_current_lpe(lpeitem); |
