Skip to content

Commit ea43ce0

Browse files
committedNov 4, 2016
Always create a main network access manager
Or threaded networking - like XYZ layers - will crash in standalone apps.
1 parent 0dd094c commit ea43ce0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/core/qgsapplication.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,9 @@ void QgsApplication::initQgis()
882882
// create map layer registry if doesn't exist
883883
QgsMapLayerRegistry::instance();
884884

885+
// Make sure we have a NAM created on the main thread.
886+
QgsNetworkAccessManager::instance();
887+
885888
// initialize authentication manager and connect to database
886889
QgsAuthManager::instance()->init( pluginPath() );
887890
}

0 commit comments

Comments
 (0)
Please sign in to comment.