From 502faf57a4443c717b8cfa4e4136eafa2751dbe9 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Sun, 14 Dec 2008 14:08:11 +0000 Subject: [PATCH] Merged revisions 895059 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/KDE/4.1/kdepim ........ r895059 | tmcguire | 2008-12-09 23:06:41 +0100 (Tue, 09 Dec 2008) | 6 lines Backport r895011 by ogoffart from trunk to the 4.1 branch: Fixes a crash ........ svn path=/branches/kdepim/enterprise4/kdepim/; revision=896801 --- actionscheduler.cpp | 3 ++- actionscheduler.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/actionscheduler.cpp b/actionscheduler.cpp index b8892af32..72d11b62b 100644 --- a/actionscheduler.cpp +++ b/actionscheduler.cpp @@ -837,7 +837,8 @@ void ActionScheduler::timeOut() 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* )) ); diff --git a/actionscheduler.h b/actionscheduler.h index f4ae80b94..727e665cf 100644 --- a/actionscheduler.h +++ b/actionscheduler.h @@ -39,6 +39,7 @@ #include #include +#include class KMHeaders; @@ -190,7 +191,7 @@ private: QTimer *timeOutTimer, *fetchTimeOutTimer; QTime timeOutTime, fetchTimeOutTime; KMCommand *lastCommand; - FolderJob *lastJob; + QPointer lastJob; }; }