[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-runtime/KDE/4.11] resources/imap: Disconnect session pool manually in ImapResource destructo
From: Dan_Vrátil <dvratil () redhat ! com>
Date: 2013-10-01 10:14:04
Message-ID: E1VQwxw-0005Mu-Cu () scm ! kde ! org
[Download RAW message or body]
Git commit 9406e45979a0b363b0262845c452dcd35dacb397 by Dan Vrátil.
Committed on 01/10/2013 at 10:12.
Pushed by dvratil into branch 'KDE/4.11'.
Disconnect session pool manually in ImapResource destructor
Otherwise the pool is disconnected when destroyed from QObject destructor.
Disconnecting while there's a task pending in ResourceScheduler leads to
calling QObject::invokeMethod() on the same QObject, which crashes, because
some of it's data has been already destroyed.
BUG: 325443
FIXED-IN: 4.11.3
M +6 -0 resources/imap/imapresource.cpp
http://commits.kde.org/kdepim-runtime/9406e45979a0b363b0262845c452dcd35dacb397
diff --git a/resources/imap/imapresource.cpp b/resources/imap/imapresource.cpp
index 3506d3b..10acaab 100644
--- a/resources/imap/imapresource.cpp
+++ b/resources/imap/imapresource.cpp
@@ -175,6 +175,12 @@ ImapResource::ImapResource( const QString &id )
ImapResource::~ImapResource()
{
+ // Disconnect and destroy the pool now, otherwise it will be called from QObject
+ // destructor and at that point ResourceBase and most of other stuff is already
+ // destroyed, which causes a crash
+ m_pool->disconnect();
+ delete m_pool;
+
delete m_bodyCheckSession;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic