diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2009-03-19 23:04:43 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2009-03-19 23:04:43 +0000 |
| commit | e05327cbfb4116070c50e7f57078fdf13ea01284 (patch) | |
| tree | 78cbc3c34a375051a4d9ab62ff5ffa704e2608bf /src | |
| parent | Dutch translation update, by Kris (diff) | |
| download | inkscape-e05327cbfb4116070c50e7f57078fdf13ea01284.tar.gz inkscape-e05327cbfb4116070c50e7f57078fdf13ea01284.zip | |
fix crash when undoing LPE path param edit just after the edit.
(bzr r7525)
Diffstat (limited to 'src')
| -rw-r--r-- | src/shape-editor.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index b5fd85858..bfe407957 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -317,22 +317,22 @@ void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject, Why not make a reload function in NodePath and in KnotHolder? */ void ShapeEditor::reset_item (SubType type, bool keep_knotholder) { - SPObject *item = sp_desktop_document(desktop)->getObjectByRepr(listener_attached_for); + /// note that it is not certain that this is an SPItem; it could be a LivePathEffectObject. + SPObject *obj = sp_desktop_document(desktop)->getObjectByRepr(listener_attached_for); switch (type) { case SH_NODEPATH: - if ( (this->nodepath) && (IS_LIVEPATHEFFECT(this->nodepath->object)) ) { - SPObject *obj = this->nodepath->object; - char * key = g_strdup(this->nodepath->repr_key); - set_item_lpe_path_parameter(SP_ITEM(item), obj, key); // the above checks for nodepath, so it is indeed a path that we are editing + if ( (nodepath) && (IS_LIVEPATHEFFECT(nodepath->object)) ) { + char * key = g_strdup(nodepath->repr_key); + set_item_lpe_path_parameter(nodepath->item, nodepath->object, key); // the above checks for nodepath, so it is indeed a path that we are editing g_free(key); } else { - set_item(SP_ITEM(item), SH_NODEPATH); - } + set_item(SP_ITEM(obj), SH_NODEPATH); + } break; case SH_KNOTHOLDER: if (this->knotholder) { - set_item(SP_ITEM(item), SH_KNOTHOLDER, keep_knotholder); + set_item(SP_ITEM(obj), SH_KNOTHOLDER, keep_knotholder); } break; } |
