summaryrefslogtreecommitdiffstats
path: root/src/attribute-rel-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/attribute-rel-util.cpp')
-rw-r--r--src/attribute-rel-util.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp
index 933339632..15c71daa7 100644
--- a/src/attribute-rel-util.cpp
+++ b/src/attribute-rel-util.cpp
@@ -141,7 +141,11 @@ void sp_attribute_clean_style(Node *repr, unsigned int flags) {
// sp_repr_css_set( repr, css, "style"); // Don't use as it will cause loop.
Glib::ustring value;
sp_repr_css_write_string(css, value);
- repr->setAttribute("style", value.c_str());
+ if( value.empty() ) {
+ repr->setAttribute("style", NULL );
+ } else {
+ repr->setAttribute("style", value.c_str());
+ }
sp_repr_css_attr_unref( css );
}