Code

Follow-up to complete fix for gradient stops and icc.
[inkscape.git] / src / sp-stop.cpp
index 031c6a3ea8f00060f855c6c928de6ee031fd4061..71f937927b2a3b62c6531b8fd3ea5eb39943abe6 100644 (file)
@@ -55,12 +55,13 @@ SPStop* SPStop::getPrevStop()
 SPColor SPStop::readStopColor( Glib::ustring const &styleStr, guint32 dfl )
 {
     SPColor color(dfl);
-    SPStyle style;
+    SPStyle* style = sp_style_new(0);
     SPIPaint paint;
-    paint.read( styleStr.c_str(), style );
+    paint.read( styleStr.c_str(), *style );
     if ( paint.isColor() ) {
         color = paint.value.color;
     }
+    sp_style_unref(style);
     return color;
 }