Skip to content

Commit a953e93

Browse files
author
wonder
committed
Fixed #2112.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12187 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f204329 commit a953e93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/symbology-ng/qgsvectorcolorrampv2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ QColor QgsVectorColorBrewerColorRampV2::color( double value ) const
160160
return QColor( 255, 0, 0 ); // red color as a warning :)
161161

162162
int paletteEntry = ( int )( value * mPalette.count() );
163-
if ( paletteEntry > mPalette.count() )
163+
if ( paletteEntry >= mPalette.count() )
164164
paletteEntry = mPalette.count() - 1;
165165
return mPalette.at( paletteEntry );
166166
}

0 commit comments

Comments
 (0)