Skip to content

Commit

Permalink
Do not dereference null pointer on QgsSelectedFeature::updateGeometry
Browse files Browse the repository at this point in the history
Fixes #14188
  • Loading branch information
Sandro Santilli committed Feb 1, 2016
1 parent 5ba6e68 commit 781c9d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/nodetool/qgsselectedfeature.cpp
Expand Up @@ -78,7 +78,7 @@ void QgsSelectedFeature::updateGeometry( QgsGeometry *geom )
{
QgsFeature f;
mVlayer->getFeatures( QgsFeatureRequest().setFilterFid( mFeatureId ) ).nextFeature( f );
mGeometry = new QgsGeometry( *f.geometry() );
mGeometry = f.geometry() ? new QgsGeometry( *f.geometry() ) : nullptr;
}
else
{
Expand Down

0 comments on commit 781c9d7

Please sign in to comment.