Skip to content

Commit

Permalink
QGisApp: fix potential crash at application closing linked to mDataSo…
Browse files Browse the repository at this point in the history
…urceManagerDialog destruction closing GDAL datasets after GDAL has been shut down
  • Loading branch information
rouault committed Oct 20, 2017
1 parent 0f3d14a commit 5288aed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -1317,15 +1317,19 @@ QgisApp::~QgisApp()
// cancel request for FileOpen events
QgsApplication::setFileOpenEventReceiver( nullptr );

QgsApplication::exitQgis();

delete QgsProject::instance();

delete mPythonUtils;

delete mTray;

delete mDataSourceManagerDialog;

// This function *MUST* be the last one called, as it destroys in
// particular GDAL. As above objects can hold GDAL/OGR objects, it is not
// safe destroying them afterwards
QgsApplication::exitQgis();
// Do *NOT* add anything here !
}

void QgisApp::dragEnterEvent( QDragEnterEvent *event )
Expand Down

0 comments on commit 5288aed

Please sign in to comment.