[Bug 260009] akonadi_resource crash on resume from suspend to RAM
Volker Krause
vkrause at kde.org
Wed Jan 12 15:04:19 GMT 2011
https://bugs.kde.org/show_bug.cgi?id=260009
Volker Krause <vkrause at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Volker Krause <vkrause kde org> 2011-01-12 16:04:16 ---
commit c6c086a80162d796f3cb2a692f516e092d4faa2c
branch master
Author: Volker Krause <vkrause at kde.org>
Date: Wed Jan 12 16:02:46 2011 +0100
Fix crash when losing network while trying to connect a new session.
In this case all already ready sessions disconnect, and with none left, the
account object is deleted to prepare the full reconnect. The pending
session then fails as well, at which point accessing m_account will crash.
BUG: 260009
diff --git a/resources/imap/sessionpool.cpp b/resources/imap/sessionpool.cpp
index f541459..e312c1c 100644
--- a/resources/imap/sessionpool.cpp
+++ b/resources/imap/sessionpool.cpp
@@ -216,10 +216,10 @@ void SessionPool::cancelSessionCreation( KIMAP::Session
*session, int errorCode,
m_pendingInitialSession = 0;
if ( !m_initialConnectDone ) {
- emit connectDone( errorCode,
- i18n( "Could not connect to the IMAP-server %1.\n%2",
- m_account->server(),
- errorMessage ) );
+ if ( m_account )
+ emit connectDone( errorCode, i18n( "Could not connect to the IMAP-server
%1.\n%2", m_account->server(), errorMessage ) );
+ else // this case can happen when we loose all ready connections while
trying to establish a new one for example
+ emit connectDone( errorCode, i18n( "Cound not connect to the IMAP
server.\n%1", errorMessage ) );
disconnect();
killSession( session, LogoutSession );
} else {
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Kdepim-bugs
mailing list