From: Jon A. Cruz Date: Wed, 16 Jun 2010 08:21:01 +0000 (-0700) Subject: Fix crash when bringing up F&S dialog with the CMS picker as default when an object... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7b496ea71f9d83fb4282fc5fd4e5e51255b8fdb0;p=inkscape.git Fix crash when bringing up F&S dialog with the CMS picker as default when an object with no icc-color is selected. --- diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index a249786ff..6c5113084 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -519,6 +519,7 @@ void ColorNotebook::_rgbaEntryChanged(GtkEntry* entry) } } +// TODO pass in param so as to avoid the need for SP_ACTIVE_DOCUMENT void ColorNotebook::_updateRgbaEntry( const SPColor& color, gfloat alpha ) { g_return_if_fail( ( 0.0 <= alpha ) && ( alpha <= 1.0 ) ); @@ -539,7 +540,7 @@ void ColorNotebook::_updateRgbaEntry( const SPColor& color, gfloat alpha ) gtk_widget_set_sensitive (_box_toomuchink, false); if (color.icc){ Inkscape::ColorProfile* prof = SP_ACTIVE_DOCUMENT->profileManager->find(color.icc->colorProfile.c_str()); - if (prof->getColorSpace() == icSigCmykData || prof->getColorSpace() == icSigCmyData){ + if ( prof && ( (prof->getColorSpace() == icSigCmykData) || (prof->getColorSpace() == icSigCmyData) ) ) { gtk_widget_show(GTK_WIDGET(_box_toomuchink)); double ink_sum = 0; for (unsigned int i=0; icolors.size(); i++){