summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-10-28 19:41:27 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-10-28 19:41:27 +0000
commit243e788771fab25a6015d8c136307f0a9f9b130c (patch)
tree5a1c50d8545a0ace37c6fdfa6df5e18924bf6928 /src/selection-chemistry.cpp
parentunit display: fix typo (diff)
downloadinkscape-243e788771fab25a6015d8c136307f0a9f9b130c.tar.gz
inkscape-243e788771fab25a6015d8c136307f0a9f9b130c.zip
fix crash
Fixed bugs: - https://launchpad.net/bugs/854617 (bzr r12742)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp20
1 files changed, 11 insertions, 9 deletions
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();