Fixed: color selector prompt would crash if no default was given

Sun, 07 Jul 2013 03:19:09 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sun, 07 Jul 2013 03:19:09 +0300
changeset 354
b32d4d66cb6e
parent 353
07b3753baedc
child 355
c2db4aa66b5d

Fixed: color selector prompt would crash if no default was given

src/colorSelectDialog.cpp file | annotate | diff | comparison | revisions
--- a/src/colorSelectDialog.cpp	Sun Jul 07 03:14:20 2013 +0300
+++ b/src/colorSelectDialog.cpp	Sun Jul 07 03:19:09 2013 +0300
@@ -116,7 +116,7 @@
 		numtext->setDefaultTextColor(( luma( col ) < 80 ) ? Qt::white : Qt::black );
 		numtext->setPos( x, y );
 		
-		if( i == sel()->index )
+		if( sel() && i == sel()->index )
 		{
 			auto curspic = m_scene->addPixmap( getIcon( "colorcursor" ));
 			curspic->setPos( x, y );

mercurial