diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-05-31 12:25:13 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2018-05-31 12:25:13 +0000 |
| commit | efa611caf2d45851a42274a922bc8a8f82ae0a19 (patch) | |
| tree | a906ccaa8f8453af0a55d4fb19b7235c879d2391 /src/object | |
| parent | Implement rendering for 'textPath' 'side' attribute. No GUI. (diff) | |
| download | inkscape-efa611caf2d45851a42274a922bc8a8f82ae0a19.tar.gz inkscape-efa611caf2d45851a42274a922bc8a8f82ae0a19.zip | |
Prevent seg fault if value is null.
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/sp-tspan.cpp | 5 |
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) |
