summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-07-24 06:56:53 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-07-24 06:56:53 +0000
commit03b12897de792083dd9686f96849af5f069ab2e0 (patch)
tree9b98257757dd8fc69d18e464abb9b9558a41fa04 /src/style.cpp
parentfix nodetype determination. more stable now. (lost symmetry detection, nobody... (diff)
downloadinkscape-03b12897de792083dd9686f96849af5f069ab2e0.tar.gz
inkscape-03b12897de792083dd9686f96849af5f069ab2e0.zip
fix crash when writing style with empty font-family
(bzr r6406)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/style.cpp b/src/style.cpp
index 766f5a7fb..1d4384c4c 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -3387,8 +3387,10 @@ sp_style_write_istring(gchar *p, gint const len, gchar const *const key,
return g_snprintf(p, len, "%s:inherit;", key);
} else {
gchar *val_quoted = css2_escape_quote(val->value);
- return g_snprintf(p, len, "%s:%s;", key, val_quoted);
- g_free (val_quoted);
+ if (val_quoted) {
+ return g_snprintf(p, len, "%s:%s;", key, val_quoted);
+ g_free (val_quoted);
+ }
}
}
return 0;