summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b85d641)
raw | patch | inline | side by side (parent: b85d641)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 29 Nov 2008 05:30:26 +0000 (05:30 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 29 Nov 2008 05:30:26 +0000 (05:30 +0000) |
src/style.cpp | patch | blob | history |
diff --git a/src/style.cpp b/src/style.cpp
index a5b25e6ffa8a2861e8c3b373a239cdbe69d32a2a..4fd8577b94cda5ae84c71cedb17df3d78684c4cb 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -3849,13 +3849,15 @@ sp_style_set_property_url (SPObject *item, gchar const *property, SPObject *link
if (repr == NULL) return;
- g_return_if_fail(linked != NULL);
-
- gchar *val = g_strdup_printf("url(#%s)", SP_OBJECT_ID(linked));
-
SPCSSAttr *css = sp_repr_css_attr_new();
- sp_repr_css_set_property(css, property, val);
- g_free(val);
+ if (linked) {
+ gchar *val = g_strdup_printf("url(#%s)", SP_OBJECT_ID(linked));
+ sp_repr_css_set_property(css, property, val);
+ g_free(val);
+ } else {
+ sp_repr_css_unset_property(css, "filter");
+ }
+
if (recursive) {
sp_repr_css_change_recursive(repr, css, "style");
} else {