summaryrefslogtreecommitdiff
path: root/community/trojita/trojita-fix-crash.patch
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2021-02-12 08:14:47 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2021-02-12 08:14:47 +0100
commit3f4b0aba086e4c750d0af8be6a0e7335e4ff81a0 (patch)
treeac6b0b2f2c1ec8432179137116a7b36a65d8bb27 /community/trojita/trojita-fix-crash.patch
parent0669be460538066d1a5faa6ef4edd336cc600fd9 (diff)
downloadpackages-3f4b0aba086e4c750d0af8be6a0e7335e4ff81a0.tar.xz
community/trojita: fixed rebuild (see FS32#146)
Diffstat (limited to 'community/trojita/trojita-fix-crash.patch')
-rw-r--r--community/trojita/trojita-fix-crash.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/community/trojita/trojita-fix-crash.patch b/community/trojita/trojita-fix-crash.patch
new file mode 100644
index 00000000..9a302728
--- /dev/null
+++ b/community/trojita/trojita-fix-crash.patch
@@ -0,0 +1,30 @@
+diff --git a/src/Imap/Network/FileDownloadManager.cpp b/src/Imap/Network/FileDownloadManager.cpp
+index 16b6c8dfc93727bd1696abaab8336b06794b3a02..c3f72176abdfd0981a5ac37ec69060fb3c7aa797 100644
+--- a/src/Imap/Network/FileDownloadManager.cpp
++++ b/src/Imap/Network/FileDownloadManager.cpp
+@@ -139,7 +139,9 @@ void FileDownloadManager::downloadMessage()
+
+ void FileDownloadManager::onPartDataTransfered()
+ {
+- Q_ASSERT(reply);
++ if (!reply) {
++ return;
++ }
+ if (reply->error() == QNetworkReply::NoError) {
+ if (!saving.open(QIODevice::WriteOnly)) {
+ emit transferError(saving.errorString());
+@@ -192,11 +194,11 @@ void FileDownloadManager::onCombinerTransferError(const QString &message)
+
+ void FileDownloadManager::deleteReply(QNetworkReply *reply)
+ {
+- if (reply == this->reply) {
++ if (reply && reply == this->reply) {
+ if (!saved)
+ onPartDataTransfered();
+- delete reply;
+- this->reply = 0;
++ reply->deleteLater();
++ this->reply = nullptr;
+ }
+ }
+