Skip to content
Permalink
Browse files

Delete authentication manager after destruction of the providers

The providers may still have threads running that use the authentication manager and their finished signal might trigger logic in the authentication manager.
  • Loading branch information
m-kuhn committed Feb 26, 2019
1 parent 9c49b8a commit 09cbc8276bc4c57f7012ca4abee1bb264eedae32
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsapplication.cpp
@@ -1169,8 +1169,6 @@ QgsAuthManager *QgsApplication::authManager()

void QgsApplication::exitQgis()
{
delete QgsApplication::authManager();

//Ensure that all remaining deleteLater QObjects are actually deleted before we exit.
//This isn't strictly necessary (since we're exiting anyway) but doing so prevents a lot of
//LeakSanitiser noise which hides real issues
@@ -1183,6 +1181,8 @@ void QgsApplication::exitQgis()

delete QgsProviderRegistry::instance();

delete QgsApplication::authManager();

// invalidate coordinate cache while the PROJ context held by the thread-locale
// QgsProjContextStore object is still alive. Otherwise if this later object
// is destroyed before the static variables of the cache, we might use freed memory.

0 comments on commit 09cbc82

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