From 44888bb0082fe80ab27aca62f59128c10d7fabfa Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 27 Jun 2010 05:05:44 +0000 Subject: [PATCH] Reenable Start/Cancel buttons in the font collector dialog even if the collection fails. Originally committed to SVN as r4618. --- aegisub/src/dialog_fonts_collector.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aegisub/src/dialog_fonts_collector.cpp b/aegisub/src/dialog_fonts_collector.cpp index a68d14ff2..642f7ec0e 100644 --- a/aegisub/src/dialog_fonts_collector.cpp +++ b/aegisub/src/dialog_fonts_collector.cpp @@ -403,8 +403,14 @@ FontsCollectorThread::FontsCollectorThread(AssFile *_subs,wxString _destination, /// @return /// wxThread::ExitCode FontsCollectorThread::Entry() { - // Collect - Collect(); + try { + Collect(); + } + catch (...) { + collector->Update(); + if (IsDetached() && TestDestroy()) Delete(); + throw; + } // After done, restore status collector->Update();