diff --git a/mailnews/base/src/nsMsgThreadedDBView.cpp b/mailnews/base/src/nsMsgThreadedDBView.cpp index 2af8d38fd4..63f58fc4cc 100644 --- a/mailnews/base/src/nsMsgThreadedDBView.cpp +++ b/mailnews/base/src/nsMsgThreadedDBView.cpp @@ -815,6 +815,11 @@ void nsMsgThreadedDBView::MoveThreadAt(nsMsgViewIndex threadIndex) m_flags.InsertElementsAt(newIndex + 1, threadFlags); m_levels.InsertElementsAt(newIndex + 1, threadLevels); } + if (newIndex == nsMsgViewIndex_None) + { + NS_WARNING("newIndex=-1 in MoveThreadAt"); + newIndex = 0; + } m_flags[newIndex] = saveFlags; // unfreeze selection. if (hasSelection)