Skip to content

Commit

Permalink
Always create a main network access manager
Browse files Browse the repository at this point in the history
Or threaded networking - like XYZ layers - will crash in standalone apps.
  • Loading branch information
m-kuhn committed Nov 4, 2016
1 parent 0dd094c commit ea43ce0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -882,6 +882,9 @@ void QgsApplication::initQgis()
// create map layer registry if doesn't exist
QgsMapLayerRegistry::instance();

// Make sure we have a NAM created on the main thread.
QgsNetworkAccessManager::instance();

// initialize authentication manager and connect to database
QgsAuthManager::instance()->init( pluginPath() );
}
Expand Down

0 comments on commit ea43ce0

Please sign in to comment.