From: joncruz Date: Tue, 25 Sep 2007 03:07:34 +0000 (+0000) Subject: Crash fix X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d465fbadf981deb83d51b224a3dabe0f290f440c;p=inkscape.git Crash fix --- diff --git a/src/color.cpp b/src/color.cpp index 6b2281f26..b16d9950f 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -191,16 +191,18 @@ std::string SPColor::toString() const sp_svg_write_color(tmp, sizeof(tmp), toRGBA32(0x0ff)); css << tmp; - if ( !css.str().empty() ) { - css << " "; - } - css << "icc-color(" << icc->colorProfile; - for (vector::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::const_iterator i(icc->colors.begin()), + iEnd(icc->colors.end()); + i != iEnd; ++i) { + css << ", " << *i; + } + css << ')'; } - css << ')'; return css.str(); }