summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-clone-original.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-02-18 12:10:14 +0000
committerJabiertxof <jtx@jtx>2017-02-18 12:10:14 +0000
commit50cff32bb7ab2fb2ab618ee5b3f4e31852e5802c (patch)
tree4405713f4584d4ebfbb483e541304165e1a27b8c /src/live_effects/lpe-clone-original.cpp
parentFix bug on rotate copies with one line vertical input (diff)
downloadinkscape-50cff32bb7ab2fb2ab618ee5b3f4e31852e5802c.tar.gz
inkscape-50cff32bb7ab2fb2ab618ee5b3f4e31852e5802c.zip
Fix bug 1665595 and prevent other LPE the same bug when using ACTIVE_DOCUMENT
Fixed bugs: - https://launchpad.net/bugs/1665595 (bzr r15530)
Diffstat (limited to 'src/live_effects/lpe-clone-original.cpp')
-rw-r--r--src/live_effects/lpe-clone-original.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/live_effects/lpe-clone-original.cpp b/src/live_effects/lpe-clone-original.cpp
index 04db6171e..b1cd6b0e5 100644
--- a/src/live_effects/lpe-clone-original.cpp
+++ b/src/live_effects/lpe-clone-original.cpp
@@ -64,6 +64,9 @@ void
LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, bool live, const char * attributes, const char * style_attributes, bool root)
{
SPDocument * document = SP_ACTIVE_DOCUMENT;
+ if (!document) {
+ return;
+ }
if ( SP_IS_GROUP(origin) && SP_IS_GROUP(dest) && SP_GROUP(origin)->getItemCount() == SP_GROUP(dest)->getItemCount() ) {
std::vector< SPObject * > childs = origin->childList(true);
size_t index = 0;