summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-11-17 11:28:29 +0000
committertavmjong-free <tavmjong@free.fr>2016-11-17 11:28:29 +0000
commitcaa14088e66284be4944ea282175958bd384044e (patch)
treea298a417ae72cec6b40eee25e4fb08eee1204abf /src
parentEnsure getVector() and getArray() return a valid gradient pointer. (diff)
downloadinkscape-caa14088e66284be4944ea282175958bd384044e.tar.gz
inkscape-caa14088e66284be4944ea282175958bd384044e.zip
Do not return invalid vector gradient when switching from mesh to linear/radial gradient.
(bzr r15254)
Diffstat (limited to 'src')
-rw-r--r--src/gradient-chemistry.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index c133bfa7c..05f594f86 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -1583,7 +1583,7 @@ SPGradient *sp_gradient_vector_for_object( SPDocument *const doc, SPDesktop *con
SPIPaint const &paint = ( (fill_or_stroke == Inkscape::FOR_FILL) ? style.fill : style.stroke );
if (paint.isPaintserver()) {
SPObject *server = (fill_or_stroke == Inkscape::FOR_FILL) ? o->style->getFillPaintServer() : o->style->getStrokePaintServer();
- if ( SP_IS_GRADIENT(server) ) {
+ if ( SP_IS_LINEARGRADIENT(server) || SP_IS_RADIALGRADIENT(server) ) {
return SP_GRADIENT(server)->getVector(true);
} else {
color = sp_desktop_get_color(desktop, (fill_or_stroke == Inkscape::FOR_FILL));