Skip to content

Commit

Permalink
Fixed #2112.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12187 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 19, 2009
1 parent f204329 commit a953e93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsvectorcolorrampv2.cpp
Expand Up @@ -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 );
}
Expand Down

0 comments on commit a953e93

Please sign in to comment.