summaryrefslogtreecommitdiffstats
path: root/src/gradient-chemistry.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-10-03 13:29:34 +0000
committertavmjong-free <tavmjong@free.fr>2016-10-03 13:29:34 +0000
commit647462662a4267c58306e49ec841abe92a958cca (patch)
tree4364fdcbcb89f4b9d6643cc8d0dd0e961916bc9c /src/gradient-chemistry.cpp
parentMerge in the new eraser mode (2) which uses clip instead of cut. (diff)
downloadinkscape-647462662a4267c58306e49ec841abe92a958cca.tar.gz
inkscape-647462662a4267c58306e49ec841abe92a958cca.zip
Prevent a crash if a mesh is defined in bounding box coordinates.
(bzr r15144)
Diffstat (limited to 'src/gradient-chemistry.cpp')
-rw-r--r--src/gradient-chemistry.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index 061fadbaa..cf5cda180 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -434,6 +434,11 @@ SPGradient *sp_gradient_convert_to_userspace(SPGradient *gr, SPItem *item, gchar
return gr;
}
+ // FIXME Transforming a mesh gradient is more complicated... probably need to add function to SPMeshArray.wq
+ if ( gr && SP_IS_MESHGRADIENT( gr ) ) {
+ return gr;
+ }
+
// First, fork it if it is shared
gr = sp_gradient_fork_private_if_necessary(gr, gr->getVector(),
SP_IS_RADIALGRADIENT(gr) ? SP_GRADIENT_TYPE_RADIAL : SP_GRADIENT_TYPE_LINEAR, item);