aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Arek Holko <fastred@users.noreply.github.com>2018-04-26 03:11:55 +0200
committerGravatar HoĆ  V. DINH <dinh.viet.hoa@gmail.com>2018-04-25 18:11:55 -0700
commitfce2447e7d042ad3f9313716e78cadb91a02e908 (patch)
treeec449f8f87e8ed40ebd638d976deaf51ad85d6c8
parent384dd5a0aa617556bd44407b86a14480be21c032 (diff)
Fix crash by adding check if owner is still present (#1707)
-rw-r--r--src/async/imap/MCIMAPAsyncConnection.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/async/imap/MCIMAPAsyncConnection.cpp b/src/async/imap/MCIMAPAsyncConnection.cpp
index 4ae633ec..df514dd9 100644
--- a/src/async/imap/MCIMAPAsyncConnection.cpp
+++ b/src/async/imap/MCIMAPAsyncConnection.cpp
@@ -57,14 +57,18 @@ namespace mailcore {
virtual void queueStartRunning() {
mConnection->setQueueRunning(true);
- mConnection->owner()->operationRunningStateChanged();
+ if (mConnection->owner()) {
+ mConnection->owner()->operationRunningStateChanged();
+ }
mConnection->queueStartRunning();
}
virtual void queueStoppedRunning() {
mConnection->setQueueRunning(false);
mConnection->tryAutomaticDisconnect();
- mConnection->owner()->operationRunningStateChanged();
+ if (mConnection->owner()) {
+ mConnection->owner()->operationRunningStateChanged();
+ }
mConnection->queueStoppedRunning();
}