Skip to content

Commit 3071ebb

Browse files
author
wonder
committed
Fix a crash when using map composer within python
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13602 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4f90472 commit 3071ebb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/composer/qgscomposition.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ QgsComposition::QgsComposition(): QGraphicsScene( 0 ), mMapRenderer( 0 ), mPlotS
5252
QgsComposition::~QgsComposition()
5353
{
5454
delete mPaperItem;
55+
56+
// make sure that all composer items are removed before
57+
// this class is deconstructed - to avoid segfaults
58+
// when composer items access in destructor composition that isn't valid anymore
59+
clear();
5560
}
5661

5762
void QgsComposition::setPaperSize( double width, double height )

0 commit comments

Comments
 (0)