From 243e788771fab25a6015d8c136307f0a9f9b130c Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 28 Oct 2013 20:41:27 +0100 Subject: fix crash Fixed bugs: - https://launchpad.net/bugs/854617 (bzr r12742) --- src/selection-chemistry.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index c5169fff5..e68feb188 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -3232,19 +3232,21 @@ void sp_selection_untile(SPDesktop *desktop) pat_transform *= item->transform; for (SPObject *child = pattern->firstChild() ; child != NULL; child = child->next ) { - Inkscape::XML::Node *copy = child->getRepr()->duplicate(xml_doc); - SPItem *i = SP_ITEM(desktop->currentLayer()->appendChildRepr(copy)); + if (SP_IS_ITEM(child)) { + Inkscape::XML::Node *copy = child->getRepr()->duplicate(xml_doc); + SPItem *i = SP_ITEM(desktop->currentLayer()->appendChildRepr(copy)); - // FIXME: relink clones to the new canvas objects - // use SPObject::setid when mental finishes it to steal ids of + // FIXME: relink clones to the new canvas objects + // use SPObject::setid when mental finishes it to steal ids of - // this is needed to make sure the new item has curve (simply requestDisplayUpdate does not work) - doc->ensureUpToDate(); + // this is needed to make sure the new item has curve (simply requestDisplayUpdate does not work) + doc->ensureUpToDate(); - Geom::Affine transform( i->transform * pat_transform ); - i->doWriteTransform(i->getRepr(), transform); + Geom::Affine transform( i->transform * pat_transform ); + i->doWriteTransform(i->getRepr(), transform); - new_select = g_slist_prepend(new_select, i); + new_select = g_slist_prepend(new_select, i); + } } SPCSSAttr *css = sp_repr_css_attr_new(); -- cgit v1.2.3