Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:Test
kdepim4
r904948.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r904948.diff of Package kdepim4
Subject: kmail: fix crash when syncing imap flags From: wstephenson@suse.de Bug: kde#106030 Patch-upstream: 904948 --- kmail/kmfolderimap.cpp (revision 904947) +++ kmail/kmfolderimap.cpp (revision 904948) @@ -1482,7 +1482,19 @@ void KMFolderImap::flagsToStatus(KMMsgBa continue; } if ( ((flags & imapFlagMap[i].imapFlag) > 0) != (oldStatus & imapFlagMap[i].kmFlag) ) { + + // The call to toggleStatus() emits a signal that the header has changed, + // which causes search folders to update. If the search folder has a rule + // that needs the complete body, it will unget() the message and invalidate + // out msg pointer. Therefore, save the index of the message before calling + // toggleStatus(), and get a valid msg pointer afterwards. + KMFolderIndex *storage = msg->storage(); + int oldIndex = -1; + if ( storage ) + oldIndex = storage->find( msg ); msg->toggleStatus( imapFlagMap[i].kmFlag ); + if ( storage ) + msg = storage->getMsg( oldIndex ); } } Index: kmail/kmfolderimap.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor