From e307f0578cb227421b6481d5794d6ec5fdf49575 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 14 Jan 2008 18:40:23 +0000 Subject: [PATCH] Maybe fixed fonts collector crashing. Originally committed to SVN as r1718. --- aegisub/dialog_fonts_collector.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/aegisub/dialog_fonts_collector.cpp b/aegisub/dialog_fonts_collector.cpp index 803dfb3fd..bc2411636 100644 --- a/aegisub/dialog_fonts_collector.cpp +++ b/aegisub/dialog_fonts_collector.cpp @@ -365,9 +365,7 @@ void FontsCollectorThread::Collect() { int oper = collector->CollectAction->GetSelection(); destFolder = collector->DestBox->GetValue(); if (oper == 1 && !wxFileName::DirExists(destFolder)) { - wxMutexGuiEnter(); AppendText(_("Invalid destination directory."),1); - wxMutexGuiLeave(); return; } @@ -380,14 +378,10 @@ void FontsCollectorThread::Collect() { } // Collect font data - wxMutexGuiEnter(); AppendText(_("Collecting font data from system. This might take a while, depending on the number of fonts installed. Results are cached and subsequent executions will be faster...\n")); - wxMutexGuiLeave(); CollectFontData(); - wxMutexGuiEnter(); AppendText(_("Done collecting font data.")); AppendText(_("Scanning file for fonts...")); - wxMutexGuiLeave(); // Scan file if (collector->CollectAction->GetSelection() != 4) { @@ -420,7 +414,6 @@ void FontsCollectorThread::Collect() { } // Copy fonts - wxMutexGuiEnter(); AppendText(wxString(_("Done.")) + _T("\n\n")); switch (oper) { case 0: AppendText(_("Checking fonts...\n")); break; @@ -428,7 +421,6 @@ void FontsCollectorThread::Collect() { case 2: AppendText(_("Copying fonts to archive...\n")); break; case 3: AppendText(_("Attaching fonts to file...\n")); break; } - wxMutexGuiLeave(); bool ok = true; bool someOk = false; for (size_t i=0;iGotoPos(pos); LogBox->SetReadOnly(true); - wxSafeYield(); + //wxSafeYield(); wxMutexGuiLeave(); }