From fb8421c3ee7cbaeace3fb9db523c28da40cc6549 Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Tue, 19 Sep 2006 23:03:06 +0000 Subject: [PATCH] fix hang doing a quick search in threaded mode with a folder/newsgroup with corrupt threading, sr=mscott 332883 --- mailnews/base/src/nsMsgQuickSearchDBView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mailnews/base/src/nsMsgQuickSearchDBView.cpp b/mailnews/base/src/nsMsgQuickSearchDBView.cpp index 674cc0e05784..c0a0645540a8 100644 --- a/mailnews/base/src/nsMsgQuickSearchDBView.cpp +++ b/mailnews/base/src/nsMsgQuickSearchDBView.cpp @@ -376,7 +376,11 @@ nsresult nsMsgQuickSearchDBView::GetFirstMessageHdrToDisplayInThread(nsIMsgThrea rv = m_db->GetMsgHdrForKey(parentId, getter_AddRefs(parent)); if (parent) { + nsMsgKey saveParentId = parentId; parent->GetThreadParent(&parentId); + // message is it's own parent - bad, let's break out of here. + if (parentId == saveParentId) + break; level++; } }