OSDN Git Service

Fix crash when click loading item
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / LogDlg.cpp
index b42f96d..937fca4 100644 (file)
@@ -512,19 +512,25 @@ void CLogDlg::FillLogMessageCtrl(bool bShow /* = true*/)
                }\r
                GitRev* pLogEntry = reinterpret_cast<GitRev *>(m_LogList.m_arShownList.GetAt(selIndex));\r
 \r
-               // set the log message text\r
-               pMsgView->SetWindowText(_T("Commit:")+pLogEntry->m_CommitHash+_T("\r\n\r\n*")+pLogEntry->m_Subject+_T("\n\n")+pLogEntry->m_Body);\r
-               // turn bug ID's into links if the bugtraq: properties have been set\r
-               // and we can find a match of those in the log message\r
-               m_ProjectProperties.FindBugID(pLogEntry->m_Body, pMsgView);\r
-               CAppUtils::FormatTextInRichEditControl(pMsgView);\r
+               if(!pLogEntry->m_IsFull)\r
+               {\r
+                       pMsgView->SetWindowText(_T("load ..."));\r
+               }else\r
+               {\r
+                       // set the log message text\r
+                       pMsgView->SetWindowText(_T("Commit:")+pLogEntry->m_CommitHash+_T("\r\n\r\n*")+pLogEntry->m_Subject+_T("\n\n")+pLogEntry->m_Body);\r
+                       // turn bug ID's into links if the bugtraq: properties have been set\r
+                       // and we can find a match of those in the log message\r
+                       m_ProjectProperties.FindBugID(pLogEntry->m_Body, pMsgView);\r
+                       CAppUtils::FormatTextInRichEditControl(pMsgView);\r
 \r
-               m_ChangedFileListCtrl.UpdateWithGitPathList(pLogEntry->m_Files);\r
-               m_ChangedFileListCtrl.m_CurrentVersion=pLogEntry->m_CommitHash;\r
-               m_ChangedFileListCtrl.Show(0);\r
+                       m_ChangedFileListCtrl.UpdateWithGitPathList(pLogEntry->m_Files);\r
+                       m_ChangedFileListCtrl.m_CurrentVersion=pLogEntry->m_CommitHash;\r
+                       m_ChangedFileListCtrl.Show(0);\r
 \r
-               m_ChangedFileListCtrl.SetRedraw(TRUE);\r
-               return;\r
+                       m_ChangedFileListCtrl.SetRedraw(TRUE);\r
+                       return;\r
+               }\r
 #if 0\r
                // fill in the changed files list control\r
                if ((m_cHidePaths.GetState() & 0x0003)==BST_CHECKED)\r