[QGIS Commit] r13602 - trunk/qgis/src/core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun May 30 10:46:43 EDT 2010


Author: wonder
Date: 2010-05-30 10:46:42 -0400 (Sun, 30 May 2010)
New Revision: 13602

Modified:
   trunk/qgis/src/core/composer/qgscomposition.cpp
Log:
Fix a crash when using map composer within python


Modified: trunk/qgis/src/core/composer/qgscomposition.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposition.cpp	2010-05-30 10:20:38 UTC (rev 13601)
+++ trunk/qgis/src/core/composer/qgscomposition.cpp	2010-05-30 14:46:42 UTC (rev 13602)
@@ -52,6 +52,11 @@
 QgsComposition::~QgsComposition()
 {
   delete mPaperItem;
+
+  // make sure that all composer items are removed before
+  // this class is deconstructed - to avoid segfaults
+  // when composer items access in destructor composition that isn't valid anymore
+  clear();
 }
 
 void QgsComposition::setPaperSize( double width, double height )



More information about the QGIS-commit mailing list