Skip to content

Commit

Permalink
Fix error on getting MainTaskBar that shows list out of bounds error …
Browse files Browse the repository at this point in the history
…when no items (taskbars) were registered
  • Loading branch information
vhanla committed Sep 25, 2019
1 parent 9339f7b commit 975222e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions taskbar.pas
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ function TTaskbars.GetMainTaskbar: PTaskbar;
Result := nil;
found := False;
if FUpdating then Exit;

I := 0;
if Count > 0 then
while (I < Count) or not found do
begin
if Items[I].MainTaskbar then
Expand Down

0 comments on commit 975222e

Please sign in to comment.