Skip to content

Commit

Permalink
Merge pull request #1667 from elpaso/bugfix11510
Browse files Browse the repository at this point in the history
Fix #11510 graduated renderer causes crash: added check for geometry
  • Loading branch information
NathanW2 committed Oct 28, 2014
2 parents 4bc4636 + 6de53e5 commit 34af978
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
Expand Down

0 comments on commit 34af978

Please sign in to comment.