From 7b496ea71f9d83fb4282fc5fd4e5e51255b8fdb0 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 16 Jun 2010 01:21:01 -0700 Subject: [PATCH] Fix crash when bringing up F&S dialog with the CMS picker as default when an object with no icc-color is selected. --- src/widgets/sp-color-notebook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++){ -- 2.30.2