Skip to content

Commit

Permalink
[Geometry checker] Fix memory corruption in QgsGeometryTypeCheck fix …
Browse files Browse the repository at this point in the history
…when converting to singleparts
  • Loading branch information
manisandro committed Jan 19, 2016
1 parent 65aa885 commit 2065850
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp
Expand Up @@ -74,7 +74,8 @@ void QgsGeometryTypeCheck::fixError( QgsGeometryCheckError* error, int method, i
changes[newFeature.id()].append( Change( ChangeFeature, ChangeAdded ) );
}
// Recycle feature for part 0
feature.setGeometry( new QgsGeometry( QgsGeomUtils::getGeomPart( geom, 0 ) ) );
feature.setGeometry( new QgsGeometry( QgsGeomUtils::getGeomPart( geom, 0 )->clone() ) );
mFeaturePool->updateFeature( feature );
changes[feature.id()].append( Change( ChangeFeature, ChangeChanged ) );
}
// Check if corresponding multi type is allowed
Expand Down

0 comments on commit 2065850

Please sign in to comment.