Skip to content
Permalink
Browse files

fix diagram crash (fixes #15575) (#3504)

  • Loading branch information
nirvn authored and m-kuhn committed Sep 19, 2016
1 parent 347a8c9 commit 9264be89e319282f307edcb961395d82c12d1b3e
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/core/qgsvectorlayerdiagramprovider.cpp
@@ -229,13 +229,14 @@ QgsLabelFeature* QgsVectorLayerDiagramProvider::registerDiagram( QgsFeature& fea
}

const GEOSGeometry* geos_geom = nullptr;
QScopedPointer<QgsGeometry> preparedGeom;
QScopedPointer<QgsGeometry> scopedPreparedGeom;
if ( QgsPalLabeling::geometryRequiresPreparation( geom, context, mSettings.coordinateTransform(), &extentGeom ) )
{
QgsGeometry preparedGeom = QgsPalLabeling::prepareGeometry( geom, context, mSettings.coordinateTransform(), &extentGeom );
if ( preparedGeom.isEmpty() )
scopedPreparedGeom.reset( new QgsGeometry( QgsPalLabeling::prepareGeometry( geom, context, mSettings.coordinateTransform(), &extentGeom ) ) );
QgsGeometry* preparedGeom = scopedPreparedGeom.data();
if ( preparedGeom->isEmpty() )
return nullptr;
geos_geom = preparedGeom.asGeos();
geos_geom = preparedGeom->asGeos();
}
else
{

0 comments on commit 9264be8

Please sign in to comment.
You can’t perform that action at this time.