Skip to content
Permalink
Browse files

Do not delete vector layer in QgsVectorLayerExporterTask thread

  • Loading branch information
blazek committed Jun 29, 2017
1 parent dcf2816 commit 7b1932a3fbddaf5e0ff52f2fd4d6cbdead3083ff
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/qgsvectorlayerexporter.cpp
@@ -495,14 +495,15 @@ bool QgsVectorLayerExporterTask::run()
mLayer.data(), mDestUri, mDestProviderKey, mDestCrs, false, &mErrorMessage,
&mOptions, mOwnedFeedback.get() );

if ( mOwnsLayer )
delete mLayer;

return mError == QgsVectorLayerExporter::NoError;
}

void QgsVectorLayerExporterTask::finished( bool result )
{
// QgsMapLayer has QTimer member, which must not be destroyed from another thread
if ( mOwnsLayer )
delete mLayer;

if ( result )
emit exportComplete();
else

0 comments on commit 7b1932a

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