qgis_process: fix unreported deadlock

This commit is contained in:
Alessandro Pasotti 2023-08-04 12:36:48 +02:00
parent 312060fbc0
commit cc7c1052e7

View File

@ -422,7 +422,7 @@ QVariantMap QgsProcessingModelAlgorithm::processAlgorithm( const QVariantMap &pa
QVariantMap results;
try
{
if ( childAlg->flags() & QgsProcessingAlgorithm::FlagNoThreading )
if ( ( childAlg->flags() & QgsProcessingAlgorithm::FlagNoThreading ) && ( QThread::currentThread() != qApp->thread() ) )
{
// child algorithm run step must be called on main thread
auto runOnMainThread = [modelThread, &context, &modelFeedback, &results, &childAlg, &childParams]