Skip to content
Permalink
Browse files

Fix #11510 graduated renderer causes crash: added check for geometry …

…needed

Funded by ItOpen - http://www.itopen.it
  • Loading branch information
elpaso committed Oct 28, 2014
1 parent efc7921 commit 6de53e51b4764be8c99329d0e8cdf8d37ee6c372
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
@@ -965,7 +965,11 @@ QList<double> QgsGraduatedSymbolRendererV2::getDataValues( QgsVectorLayer *vlaye
else
lst = expression->referencedColumns();

QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( lst, vlayer->pendingFields() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest()
.setFlags( expression->needsGeometry() ?
QgsFeatureRequest::NoFlags :
QgsFeatureRequest::NoGeometry )
.setSubsetOfAttributes( lst, vlayer->pendingFields() ) );

// create list of non-null attribute values
while ( fit.nextFeature( f ) )

0 comments on commit 6de53e5

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