From: buliabyak Date: Wed, 27 Jun 2007 20:26:29 +0000 (+0000) Subject: a couple more checks just in case X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6db968d233c323accd9765ea646c2dba329bb528;p=inkscape.git a couple more checks just in case --- diff --git a/src/style.cpp b/src/style.cpp index 699d95054..fbd472129 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -2165,11 +2165,13 @@ sp_style_merge_ifilter(SPStyle *style, SPIFilter const *parent) if (style->filter.href && style->filter.href->getObject()) style->filter.href->detach(); - try { - style->filter.href->attach(*parent->href->getURI()); - } catch (Inkscape::BadURIException &e) { - g_warning("%s", e.what()); - style->filter.href->detach(); + if (style->filter.href && parent->href) { + try { + style->filter.href->attach(*parent->href->getURI()); + } catch (Inkscape::BadURIException &e) { + g_warning("%s", e.what()); + style->filter.href->detach(); + } } } @@ -3673,7 +3675,7 @@ sp_style_write_ifilter(gchar *p, gint const len, gchar const *key, { if (val->inherit) { return g_snprintf(p, len, "%s:inherit;", key); - } else if (val->href->getURI()) { + } else if (val->href && val->href->getURI()) { return g_snprintf(p, len, "%s:url(%s);", key, val->href->getURI()->toString()); } }