Skip to content

Commit

Permalink
QgsWfsProviderMetadata::querySublayers(): fix crash if wfsGetFeatureG…
Browse files Browse the repository at this point in the history
…eometryTypesTimeout setting set to 0
  • Loading branch information
rouault committed Jan 3, 2023
1 parent dfadba6 commit 494e636
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/providers/wfs/qgswfsprovidermetadata.cpp
Expand Up @@ -290,7 +290,12 @@ QList<QgsProviderSublayerDetails> QgsWfsProviderMetadata::querySublayers( const
connect( &timerForHits, &QTimer::timeout, &loop, &QEventLoop::quit );
connect( feedback, &QgsFeedback::canceled, &loop, &QEventLoop::quit );
loop.exec( QEventLoop::ExcludeUserInputEvents );

// Make sure to terminate requests in this thread, to avoid potential
// crash in main thread when "requests" goes out of scope.
for ( auto &request : requests )
{
request->abort();
}
};

std::unique_ptr<_DownloaderThread> downloaderThread =
Expand Down

0 comments on commit 494e636

Please sign in to comment.