diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-19 20:39:44 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-19 20:39:44 +0100 |
commit | 54eca75a4e3e380e1d386f4d235baeb7d4ff332e (patch) | |
tree | 5f59a3e7b9069e5ab5ae4c5b46184560dc318692 /kde-frameworks/kio/files/kio-5.96.0-fix-crash-in-dropjob.patch | |
parent | fc7e841956ae3cc385629bf33433de23a6d04db6 (diff) |
gentoo auto-resync : 19:07:2022 - 20:39:44
Diffstat (limited to 'kde-frameworks/kio/files/kio-5.96.0-fix-crash-in-dropjob.patch')
-rw-r--r-- | kde-frameworks/kio/files/kio-5.96.0-fix-crash-in-dropjob.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.96.0-fix-crash-in-dropjob.patch b/kde-frameworks/kio/files/kio-5.96.0-fix-crash-in-dropjob.patch new file mode 100644 index 000000000000..638a03f6eb98 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.96.0-fix-crash-in-dropjob.patch @@ -0,0 +1,45 @@ +From 29bdf541aa83c78bc8e9d90487a7e1dd505ef013 Mon Sep 17 00:00:00 2001 +From: David Edmundson <kde@davidedmundson.co.uk> +Date: Fri, 8 Jul 2022 15:46:11 +0100 +Subject: [PATCH] Fix crash in DropJob + +QMimeData is owned by the backend and can be deleted during any event +processing. + +DropJob has a deferred start operation. One path in this is to call +PasteJob with mimedata. It could be dangling by this point. + +Pastejob follows a similar pattern in +1d668a9fe65c5bc178487fc32e6662ff815147f6 internally but we also need to +handle this usage before PasteJob. + +BUG: 454747 +--- + src/widgets/dropjob.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/widgets/dropjob.cpp b/src/widgets/dropjob.cpp +index fa2bf4ccc..5af578d28 100644 +--- a/src/widgets/dropjob.cpp ++++ b/src/widgets/dropjob.cpp +@@ -139,7 +139,7 @@ public: + void addPluginActions(KIO::DropMenu *popup, const KFileItemListProperties &itemProps); + void doCopyToDirectory(); + +- const QMimeData *m_mimeData; ++ QPointer<const QMimeData> m_mimeData; + const QList<QUrl> m_urls; + QMap<QString, QString> m_metaData; + Qt::DropAction m_dropAction; +@@ -271,7 +271,7 @@ void DropJobPrivate::slotStart() + q->emitResult(); + } + } +- } else { ++ } else if (m_mimeData) { + // Dropping raw data + KIO::PasteJob *job = KIO::PasteJobPrivate::newJob(m_mimeData, m_destUrl, KIO::HideProgressInfo, false /*not clipboard*/); + QObject::connect(job, &KIO::PasteJob::itemCreated, q, &KIO::DropJob::itemCreated); +-- +GitLab + |