git-svn-id: http://svn.osgeo.org/qgis/trunk@12187 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2009-11-19 11:22:20 +00:00
parent a5574d1ac2
commit a2fb4167ef

View File

@ -160,7 +160,7 @@ QColor QgsVectorColorBrewerColorRampV2::color( double value ) const
return QColor( 255, 0, 0 ); // red color as a warning :)
int paletteEntry = ( int )( value * mPalette.count() );
if ( paletteEntry > mPalette.count() )
if ( paletteEntry >= mPalette.count() )
paletteEntry = mPalette.count() - 1;
return mPalette.at( paletteEntry );
}