Skip to content
Permalink
Browse files

Merge pull request #1667 from elpaso/bugfix11510

Fix #11510 graduated renderer causes crash: added check for geometry
  • Loading branch information
NathanW2 committed Oct 28, 2014
2 parents 4bc4636 + 6de53e5 commit 34af9788a4ac09a0d98d2d5b8f098c7bfacc8eed
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 34af978

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