From: buliabyak Date: Thu, 24 Jul 2008 06:56:53 +0000 (+0000) Subject: fix crash when writing style with empty font-family X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fe424995a5ece284f65fd53e64a5d28897e4e0ea;p=inkscape.git fix crash when writing style with empty font-family --- 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;