From 9745ec425934ecb36ddd1b741af6845aef309837 Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Wed, 8 Sep 2004 16:44:04 +0000 Subject: [PATCH] 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 --- mozilla/mailnews/base/src/nsMsgDBView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp index a6c75474090..94f01113dea 100644 --- a/mozilla/mailnews/base/src/nsMsgDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp @@ -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: