Skip to content
Permalink
Browse files

Fix crash in ticket #3528

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15305 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 1, 2011
1 parent ebd8f12 commit eae780727d61baa37cc582b7fd5c3b029333846c
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -908,7 +908,12 @@ void QgsSpatiaLiteProvider::uniqueValues( int index, QList < QVariant > &uniqueV
uniqueValues.clear();

// get the field name
const QgsField & fld = field( index );
QgsFieldMap::const_iterator fieldIt = attributeFields.find( index );
if ( fieldIt == attributeFields.constEnd() )
{
return; //invalid field
}
const QgsField& fld = fieldIt.value();

sql = QString( "SELECT DISTINCT %1 FROM %2 ORDER BY %1" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );

0 comments on commit eae7807

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