Skip to content

Commit 854a904

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 1e49bb1 commit 854a904

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
@@ -1177,8 +1177,6 @@ QgsAuthManager *QgsApplication::authManager()
11771177

11781178
void QgsApplication::exitQgis()
11791179
{
1180-
delete QgsApplication::authManager();
1181-
11821180
//Ensure that all remaining deleteLater QObjects are actually deleted before we exit.
11831181
//This isn't strictly necessary (since we're exiting anyway) but doing so prevents a lot of
11841182
//LeakSanitiser noise which hides real issues
@@ -1191,6 +1189,8 @@ void QgsApplication::exitQgis()
11911189

11921190
delete QgsProviderRegistry::instance();
11931191

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

0 commit comments

Comments
 (0)