mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Do not delete vector layer in QgsVectorLayerExporterTask thread
This commit is contained in:
parent
dcf2816835
commit
7b1932a3fb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user