From c6f9b07a27af0905401113587b84445588bc45b6 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Thu, 21 May 2015 00:00:40 +0200 Subject: [PATCH] feature: fix crash when feature 'owns' no geometry --- src/core/qgsfeature_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/qgsfeature_p.h b/src/core/qgsfeature_p.h index ad0fd4ee51d..a53ecf16663 100644 --- a/src/core/qgsfeature_p.h +++ b/src/core/qgsfeature_p.h @@ -47,7 +47,7 @@ class CORE_EXPORT QgsFeaturePrivate : public QSharedData : QSharedData( other ) , fid( other.fid ) , attributes( other.attributes ) - , geometry( other.ownsGeometry ? new QgsGeometry( *other.geometry ) : other.geometry ) + , geometry( other.ownsGeometry && other.geometry ? new QgsGeometry( *other.geometry ) : other.geometry ) , ownsGeometry( other.ownsGeometry ) , valid( other.valid ) , fields( other.fields )