summaryrefslogtreecommitdiffstats
path: root/src/object/sp-tspan.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-05-31 12:25:13 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-05-31 12:25:13 +0000
commitefa611caf2d45851a42274a922bc8a8f82ae0a19 (patch)
treea906ccaa8f8453af0a55d4fb19b7235c879d2391 /src/object/sp-tspan.cpp
parentImplement rendering for 'textPath' 'side' attribute. No GUI. (diff)
downloadinkscape-efa611caf2d45851a42274a922bc8a8f82ae0a19.tar.gz
inkscape-efa611caf2d45851a42274a922bc8a8f82ae0a19.zip
Prevent seg fault if value is null.
Diffstat (limited to 'src/object/sp-tspan.cpp')
-rw-r--r--src/object/sp-tspan.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/object/sp-tspan.cpp b/src/object/sp-tspan.cpp
index 9aee85d39..175e5da3f 100644
--- a/src/object/sp-tspan.cpp
+++ b/src/object/sp-tspan.cpp
@@ -283,6 +283,7 @@ void SPTextPath::release() {
}
void SPTextPath::set(unsigned int key, const gchar* value) {
+
if (this->attributes.readSingleAttribute(key, value, style, &viewport)) {
this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
} else {
@@ -291,6 +292,10 @@ void SPTextPath::set(unsigned int key, const gchar* value) {
this->sourcePath->link((char*)value);
break;
case SP_ATTR_SIDE:
+ if (!value) {
+ return;
+ }
+
if (strncmp(value, "left", 4) == 0)
side = SP_TEXT_PATH_SIDE_LEFT;
else if (strncmp(value, "right", 5) == 0)