Skip to content
Permalink
Browse files
Fixed #2112.
git-svn-id: http://svn.osgeo.org/qgis/trunk@12187 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 19, 2009
1 parent a5574d1 commit a2fb4167efb5e930113f657e09f61f7b0781422d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/symbology-ng/qgsvectorcolorrampv2.cpp
@@ -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 );
}

0 comments on commit a2fb416

Please sign in to comment.