[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/kmail
From: Allen Winter <winter () kde ! org>
Date: 2010-10-04 23:39:16
Message-ID: 20101004233916.D3B363E1F1 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1182567 by winterz:
add some saftey checks in highlightMessage(), making sure that the index returned
from msgId() is in a valid range and that the KMMessage returned from getMsg()
is ok as well. might help prevent a crash.
MERGE: none
M +11 -3 kmheaders.cpp
--- branches/kdepim/enterprise/kdepim/kmail/kmheaders.cpp #1182566:1182567
@@ -2124,14 +2124,22 @@
}
if (!item) {
- emit selected( 0 ); return;
+ emit selected( 0 );
+ return;
}
int idx = item->msgId();
+ if ( idx < 0 ) {
+ emit selected( 0 );
+ return;
+ }
+
KMMessage *msg = mFolder->getMsg(idx);
- if (mReaderWindowActive && !msg) {
+ if ( !msg ) {
+ if ( mReaderWindowActive ) {
+ mPrevCurrent = 0;
+ }
emit selected( 0 );
- mPrevCurrent = 0;
return;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic