Skip to content
Permalink
Browse files

Load raster category names fix

  • Loading branch information
blazek committed Nov 4, 2013
1 parent d901e50 commit c59cd92c12c0a04c6b772561acf4f2b652e0d6d3
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/providers/gdal/qgsgdalproviderbase.cpp
@@ -63,11 +63,14 @@ QList<QgsColorRampShader::ColorRampItem> QgsGdalProviderBase::colorTable( GDALDa
// load category labels
char ** categoryNames = GDALGetRasterCategoryNames( myGdalBand );
QVector<QString> labels;
int i = 0;
while ( categoryNames[i] )
if ( categoryNames )
{
labels.append( QString( categoryNames[i] ) );
i++;
int i = 0;
while ( categoryNames[i] )
{
labels.append( QString( categoryNames[i] ) );
i++;
}
}

int myEntryCount = GDALGetColorEntryCount( myGdalColorTable );

0 comments on commit c59cd92

Please sign in to comment.
You can’t perform that action at this time.