OSDN Git Service

Fix crash when click loading item
authorFrank Li <lznuaa@gmail.com>
Thu, 1 Jan 2009 13:25:56 +0000 (21:25 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 1 Jan 2009 13:25:56 +0000 (21:25 +0800)
src/Git/Git.cpp
src/TortoiseProc/LogDlg.cpp

index b33a266..7a4eede 100644 (file)
@@ -76,7 +76,7 @@ void CGit::StringAppend(CString *str,char *p)
        USES_CONVERSION;\r
        str->Append(A2W(p));\r
 \r
-}\r
+}      \r
 \r
 int CGit::Run(CString cmd, CString* output)\r
 {\r
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