mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 12:59:12 +02:00
Bug fix: Pressing refresh button after update crashes OPM. Bug reported by @minesadorada.
git-svn-id: trunk@53640 -
This commit is contained in:
parent
6dfd84797d
commit
4713fdef72
@ -151,6 +151,8 @@ begin
|
|||||||
PackageDownloader.OnJSONDownloadCompleted := @DoOnJSONDownloadCompleted;
|
PackageDownloader.OnJSONDownloadCompleted := @DoOnJSONDownloadCompleted;
|
||||||
Updates := TUpdates.Create(LocalRepositoryUpdatesFile);
|
Updates := TUpdates.Create(LocalRepositoryUpdatesFile);
|
||||||
Updates.OnUpdate := @DoOnUpdate;
|
Updates.OnUpdate := @DoOnUpdate;
|
||||||
|
Updates.StartUpdate;
|
||||||
|
Updates.PauseUpdate;
|
||||||
InstallPackageList := TObjectList.Create(True);
|
InstallPackageList := TObjectList.Create(True);
|
||||||
FHintTimeOut := Application.HintHidePause;
|
FHintTimeOut := Application.HintHidePause;
|
||||||
Application.HintHidePause := 1000000;
|
Application.HintHidePause := 1000000;
|
||||||
|
@ -96,7 +96,6 @@ type
|
|||||||
procedure StopUpdate;
|
procedure StopUpdate;
|
||||||
procedure PauseUpdate;
|
procedure PauseUpdate;
|
||||||
published
|
published
|
||||||
property IsPaused: Boolean read FPaused;
|
|
||||||
property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate;
|
property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -497,11 +496,11 @@ end;
|
|||||||
|
|
||||||
procedure TUpdates.StartUpdate;
|
procedure TUpdates.StartUpdate;
|
||||||
begin
|
begin
|
||||||
FOpenSSLAvaialable := False;
|
|
||||||
Load;
|
Load;
|
||||||
FPaused := False;
|
FPaused := False;
|
||||||
if FStarted then
|
if FStarted then
|
||||||
Exit;
|
Exit;
|
||||||
|
FOpenSSLAvaialable := False;
|
||||||
FStarted := True;
|
FStarted := True;
|
||||||
FTimer := TThreadTimer.Create;
|
FTimer := TThreadTimer.Create;
|
||||||
FTimer.Interval := UpdateInterval;
|
FTimer.Interval := UpdateInterval;
|
||||||
|
Loading…
Reference in New Issue
Block a user