summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-06-27 20:26:29 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-06-27 20:26:29 +0000
commit686d5f538dadc66692c2da3ee047657978175073 (patch)
treea9df1fd808bb3f1ace3f139d1f4fa39ea42269f5 /src/style.cpp
parentfixed broken markup in EU translation (diff)
downloadinkscape-686d5f538dadc66692c2da3ee047657978175073.tar.gz
inkscape-686d5f538dadc66692c2da3ee047657978175073.zip
a couple more checks just in case
(bzr r3148)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp14
1 files changed, 8 insertions, 6 deletions
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());
}
}