mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 14:29:29 +02:00
Converter: Prevent the IDE freezing when cancelling the conversion. A non-started thread was waited for.
git-svn-id: trunk@53890 -
This commit is contained in:
parent
7f70c71a43
commit
714bd8024f
@ -31,7 +31,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, AVL_Tree,
|
||||
Forms, Controls, Dialogs, StdCtrls, Buttons, ButtonPanel, ComCtrls,
|
||||
// LCL
|
||||
Forms, Controls, Dialogs, StdCtrls, Buttons, ButtonPanel, ComCtrls, LCLProc,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, DividerBevel, LazConfigStorage,
|
||||
// CodeTools
|
||||
@ -979,7 +980,8 @@ end;
|
||||
|
||||
procedure TConvertSettingsForm.CancelButtonClick(Sender: TObject);
|
||||
begin
|
||||
if Assigned(fCacheUnitsThread) then begin
|
||||
if Assigned(fCacheUnitsThread) and fThreadStarted then
|
||||
begin
|
||||
(fCacheUnitsThread as TCacheUnitsThread).Searcher.Stop;
|
||||
fCacheUnitsThread.WaitFor;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user