Skip to content
Permalink
Browse files

Fix crash in ticket #3528

git-svn-id: http://svn.osgeo.org/qgis/trunk@15305 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 1, 2011
1 parent 44441de commit b055bdc82a25e3bc63079c773473804d61f60dff
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 b055bdc

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