diff --git a/src/color.cpp b/src/color.cpp
index 6b2281f2697457dde841dd58e3dc5391f7df25aa..54af89ae5d5c92665b458a5cf5666d11179a7d5b 100644 (file)
--- a/src/color.cpp
+++ b/src/color.cpp
SPColor& SPColor::operator= (SPColor const& other)
{
- SVGICCColor* tmp = other.icc ? new SVGICCColor(*other.icc) : 0;
+ SVGICCColor* tmp_icc = other.icc ? new SVGICCColor(*other.icc) : 0;
+
v.c[0] = other.v.c[0];
v.c[1] = other.v.c[1];
v.c[2] = other.v.c[2];
if ( icc ) {
delete icc;
}
- icc = tmp;
+ icc = tmp_icc;
return *this;
}
sp_svg_write_color(tmp, sizeof(tmp), toRGBA32(0x0ff));
css << tmp;
- if ( !css.str().empty() ) {
- css << " ";
- }
- css << "icc-color(" << icc->colorProfile;
- for (vector<double>::const_iterator i(icc->colors.begin()),
- iEnd(icc->colors.end());
- i != iEnd; ++i) {
- css << ", " << *i;
+ if ( icc ) {
+ if ( !css.str().empty() ) {
+ css << " ";
+ }
+ css << "icc-color(" << icc->colorProfile;
+ for (vector<double>::const_iterator i(icc->colors.begin()),
+ iEnd(icc->colors.end());
+ i != iEnd; ++i) {
+ css << ", " << *i;
+ }
+ css << ')';
}
- css << ')';
return css.str();
}
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :