Skip to content
Permalink
Browse files

Always create a main network access manager

Or threaded networking - like XYZ layers - will crash in standalone apps.
  • Loading branch information
m-kuhn committed Nov 4, 2016
1 parent 0dd094c commit ea43ce0e00574f79b68da3526117ae4a151927d2
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/qgsapplication.cpp
@@ -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() );
}

0 comments on commit ea43ce0

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