File r895059-online-imap-filter-crash.diff of Package kdepim4
Subject: Fix crash on filtering online imap
From: wstephenson@suse.de
Patch-Upstream: 895059
Index: kmail/actionscheduler.h
===================================================================
--- kmail/actionscheduler.h (revision 895058)
+++ kmail/actionscheduler.h (revision 895059)
@@ -39,6 +39,7 @@
#include <QList>
#include <QTime>
+#include <QPointer>
class KMHeaders;
@@ -190,7 +191,7 @@
QTimer *timeOutTimer, *fetchTimeOutTimer;
QTime timeOutTime, fetchTimeOutTime;
KMCommand *lastCommand;
- FolderJob *lastJob;
+ QPointer<FolderJob> lastJob;
};
}
Index: kmail/actionscheduler.cpp
===================================================================
--- kmail/actionscheduler.cpp (revision 895058)
+++ kmail/actionscheduler.cpp (revision 895059)
@@ -837,7 +837,8 @@
void ActionScheduler::fetchTimeOut()
{
// Note: This is a good place for a debug statement
- assert( lastJob );
+ if( !lastJob )
+ return;
// sometimes imap jobs seem to just stall so give up and move on
disconnect( lastJob, SIGNAL(messageRetrieved( KMMessage* )),
this, SLOT(messageFetched( KMMessage* )) );