mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fixed #2112.
git-svn-id: http://svn.osgeo.org/qgis/trunk@12187 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
a5574d1ac2
commit
a2fb4167ef
@ -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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user