Fixing mailnews crash (bug 258386) when hitting 'b' to go to the previous message when on the first message. r=bienvenu@nventure.com, sr=mscott@mozilla.org, a=mkaply@us.ibm.com

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@161921 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com
2004-09-08 16:44:04 +00:00
parent feaaa5023b
commit 9745ec4259

View File

@@ -4843,7 +4843,7 @@ nsresult nsMsgDBView::NavigateFromPos(nsMsgNavigationTypeValue motion, nsMsgView
*pResultKey = m_keys.GetAt(*pResultIndex);
break;
case nsMsgNavigationType::previousMessage:
*pResultIndex = (startIndex != nsMsgViewIndex_None) ? startIndex - 1 : 0;
*pResultIndex = (startIndex != nsMsgViewIndex_None && startIndex > 0) ? startIndex - 1 : 0;
*pResultKey = m_keys.GetAt(*pResultIndex);
break;
case nsMsgNavigationType::lastMessage: