File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,14 @@ QgsFeature & QgsFeature::operator=( QgsFeature const & rhs )
61
61
mAttributes = rhs.mAttributes ;
62
62
mValid = rhs.mValid ;
63
63
mTypeName = rhs.mTypeName ;
64
+
65
+ // make sure to delete the old geometry (if exists)
66
+ if (mGeometry && mOwnsGeometry )
67
+ delete mGeometry ;
68
+
64
69
mGeometry = 0 ;
65
70
mOwnsGeometry = false ;
66
-
71
+
67
72
if ( rhs.mGeometry )
68
73
setGeometry ( *rhs.mGeometry );
69
74
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ bool QgsGrassProvider::nextFeature( QgsFeature& feature )
293
293
int cat, type, id;
294
294
unsigned char *wkb;
295
295
int wkbsize;
296
-
296
+
297
297
QgsDebugMsgLevel ( " entered." , 3 );
298
298
299
299
if ( isEdited () || isFrozen () || !mValid )
@@ -318,7 +318,7 @@ bool QgsGrassProvider::nextFeature( QgsFeature& feature )
318
318
QgsDebugMsg ( QString ( " cat = %1 type = %2 id = %3" ).arg ( cat ).arg ( type ).arg ( id ) );
319
319
#endif
320
320
321
- feature = QgsFeature ( id );
321
+ feature. setFeatureId (id );
322
322
323
323
// TODO int may be 64 bits (memcpy)
324
324
if ( type & ( GV_POINTS | GV_LINES ) ) /* points or lines */
You can’t perform that action at this time.
0 commit comments