Patch #2483 2008-05-25 15:01

jenslody

patch for bug #13877
Download
2483-patch_for_bug.patch (596 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2008-07-11 15:12
Assigned to
mortenmacfly
--- codeblocks-1.0svn.orig/src/src/app.cpp    2008-05-01 07:11:56.000000000 +0200
+++ codeblocks-1.0svn.work/src/src/app.cpp    2008-05-25 12:24:12.000000000 +0200
@@ -780,9 +783,13 @@
 
     if (m_pBatchBuildDialog && m_BatchWindowAutoClose)
     {
-        m_pBatchBuildDialog->EndModal(wxID_OK);
-        m_pBatchBuildDialog->Destroy();
-        m_pBatchBuildDialog = 0;
+        if(m_pBatchBuildDialog->IsModal())
+            m_pBatchBuildDialog->EndModal(wxID_OK);
+        else
+        {
+            m_pBatchBuildDialog->Destroy();
+            m_pBatchBuildDialog = 0;
+        }
     }
 }