OSDN Git Service

Try fix a crash after commit at log dialog
authorFrank Li <lznuaa@gmail.com>
Thu, 29 Oct 2009 02:49:17 +0000 (10:49 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 29 Oct 2009 02:49:17 +0000 (10:49 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/GitLogListBase.cpp
src/TortoiseProc/LogDlg.cpp

index 3f06fe1..986c780 100644 (file)
@@ -2178,7 +2178,8 @@ void CGitLogListBase::Refresh()
                if(ret == WAIT_TIMEOUT)\r
                        TerminateThread();\r
        }\r
-\r
+       \r
+       this->SetItemCountEx(0);\r
        this->Clear();\r
 \r
        //Update branch and Tag info\r
@@ -2186,7 +2187,7 @@ void CGitLogListBase::Refresh()
        //Assume Thread have exited\r
        //if(!m_bThreadRunning)\r
        {\r
-               this->SetItemCountEx(0);\r
+               \r
                m_logEntries.clear();\r
                m_bExitThread=FALSE;\r
                InterlockedExchange(&m_bThreadRunning, TRUE);\r
index bde64e1..6d6fd3d 100644 (file)
@@ -618,12 +618,13 @@ void CLogDlg::FillLogMessageCtrl(bool bShow /* = true*/)
 \r
 void CLogDlg::OnBnClickedRefresh()\r
 {\r
-       m_limit = 0;\r
+       \r
        Refresh (true);\r
 }\r
 \r
 void CLogDlg::Refresh (bool /*autoGoOnline*/)\r
 {\r
+       m_limit = 0;\r
        m_LogList.Refresh();\r
        FillLogMessageCtrl(false);\r
 }\r