Skip to content
Permalink
Browse files

Fixed #2112.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12187 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 19, 2009
1 parent f204329 commit a953e934d56d53170b6a6711594dfb72006b4099
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 a953e93

Please sign in to comment.