From 001281487edbd7bca8ee9fba1135b84dba3c9c36 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 23 Sep 2008 21:32:47 +0000 Subject: fix crash on entering invalid lpe name in xml (bzr r6873) --- src/live_effects/lpeobject.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/live_effects/lpeobject.cpp') diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp index a73f9ccd6..ab49de14f 100644 --- a/src/live_effects/lpeobject.cpp +++ b/src/live_effects/lpeobject.cpp @@ -215,12 +215,11 @@ livepatheffect_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscap repr = xml_doc->createElement("inkscape:path-effect"); } - if ((flags & SP_OBJECT_WRITE_ALL) || lpeobj->effecttype_set) + if ((flags & SP_OBJECT_WRITE_ALL) || lpeobj->lpe) { repr->setAttribute("effect", Inkscape::LivePathEffect::LPETypeConverter.get_key(lpeobj->effecttype).c_str()); -// lpeobj->lpe->write(repr); something like this. - - lpeobj->lpe->writeParamsToSVG(); + lpeobj->lpe->writeParamsToSVG(); + } if (((SPObjectClass *) livepatheffect_parent_class)->write) (* ((SPObjectClass *) livepatheffect_parent_class)->write)(object, xml_doc, repr, flags); -- cgit v1.2.3