Skip to content

Commit

Permalink
[auth] bulletproof QgsAuthManager singleton to make server happy
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 26, 2017
1 parent 4c7e3ff commit 5571a87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -876,7 +876,6 @@ void QgsApplication::initQgis()
QgsProject::instance();

// Initialize authentication manager and connect to database
instance()->mAuthManager = QgsAuthManager::instance();
authManager()->init( pluginPath(), qgisAuthDatabaseFilePath() );

// Make sure we have a NAM created on the main thread.
Expand All @@ -890,6 +889,10 @@ void QgsApplication::initQgis()

QgsAuthManager *QgsApplication::authManager()
{
if ( ! instance()->mAuthManager )
{
instance()->mAuthManager = QgsAuthManager::instance();
}
return instance()->mAuthManager;
}

Expand Down

0 comments on commit 5571a87

Please sign in to comment.