Skip to content

Commit 09cbc82

Browse files
committed
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.
1 parent 9c49b8a commit 09cbc82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/qgsapplication.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,6 @@ QgsAuthManager *QgsApplication::authManager()
11691169

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

11841182
delete QgsProviderRegistry::instance();
11851183

1184+
delete QgsApplication::authManager();
1185+
11861186
// invalidate coordinate cache while the PROJ context held by the thread-locale
11871187
// QgsProjContextStore object is still alive. Otherwise if this later object
11881188
// is destroyed before the static variables of the cache, we might use freed memory.

0 commit comments

Comments
 (0)