Bug fix: Pressing refresh button after update crashes OPM. Bug reported by @minesadorada.

git-svn-id: trunk@53640 -
This commit is contained in:
balazs 2016-12-11 18:26:22 +00:00
parent 6dfd84797d
commit 4713fdef72
2 changed files with 3 additions and 2 deletions

View File

@ -151,6 +151,8 @@ begin
PackageDownloader.OnJSONDownloadCompleted := @DoOnJSONDownloadCompleted;
Updates := TUpdates.Create(LocalRepositoryUpdatesFile);
Updates.OnUpdate := @DoOnUpdate;
Updates.StartUpdate;
Updates.PauseUpdate;
InstallPackageList := TObjectList.Create(True);
FHintTimeOut := Application.HintHidePause;
Application.HintHidePause := 1000000;

View File

@ -96,7 +96,6 @@ type
procedure StopUpdate;
procedure PauseUpdate;
published
property IsPaused: Boolean read FPaused;
property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate;
end;
@ -497,11 +496,11 @@ end;
procedure TUpdates.StartUpdate;
begin
FOpenSSLAvaialable := False;
Load;
FPaused := False;
if FStarted then
Exit;
FOpenSSLAvaialable := False;
FStarted := True;
FTimer := TThreadTimer.Create;
FTimer.Interval := UpdateInterval;