summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-04-24 08:41:15 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-04-24 20:58:24 +0000
commit7e5838231b883a202a039c78bb39e3d383a700cc (patch)
tree162654b6e86099cc8643d7b7cda7f05903852249 /src/style.cpp
parentFix commandline page selection page selection and allow to select poppler in cmd (diff)
downloadinkscape-7e5838231b883a202a039c78bb39e3d383a700cc.tar.gz
inkscape-7e5838231b883a202a039c78bb39e3d383a700cc.zip
fix #175 crash with mask in <style>
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/style.cpp b/src/style.cpp
index 1cece6dbd..c83b19230 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -685,7 +685,9 @@ SPStyle::readIfUnset(SPAttributeEnum id, gchar const *val, SPStyleSrc const &sou
g_warning("attribute 'clip-path' given as CSS");
//XML Tree being directly used here.
- this->object->getRepr()->setAttribute("clip-path", val);
+ if (object) {
+ object->getRepr()->setAttribute("clip-path", val);
+ }
return;
case SP_PROP_MASK:
/** \todo
@@ -694,7 +696,9 @@ SPStyle::readIfUnset(SPAttributeEnum id, gchar const *val, SPStyleSrc const &sou
g_warning("attribute 'mask' given as CSS");
//XML Tree being directly used here.
- this->object->getRepr()->setAttribute("mask", val);
+ if (object) {
+ object->getRepr()->setAttribute("mask", val);
+ }
return;
case SP_PROP_FILTER:
if( !filter.inherit ) filter.readIfUnset( val, source );