Skip to content

Commit

Permalink
fix crash when application is closed while browser is still filling t…
Browse files Browse the repository at this point in the history
…he tree
  • Loading branch information
jef-n committed Sep 18, 2015
1 parent 323d3ce commit 065bb10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgsdataitem.cpp
Expand Up @@ -388,7 +388,8 @@ QVector<QgsDataItem*> QgsDataItem::runCreateChildren( QgsDataItem* item )
if ( !child ) // should not happen
continue;
QgsDebugMsg( "moveToThread child " + child->path() );
child->moveToThread( QApplication::instance()->thread() ); // moves also children
if ( qApp )
child->moveToThread( qApp->thread() ); // moves also children
}
QgsDebugMsg( QString( "finished path %1: %2 children" ).arg( item->path() ).arg( children.size() ) );
return children;
Expand Down

0 comments on commit 065bb10

Please sign in to comment.