From 975222e0c94d88e05bd5d4d1361bda12c53e98c3 Mon Sep 17 00:00:00 2001 From: vhanla Date: Wed, 25 Sep 2019 15:26:49 -0500 Subject: [PATCH] Fix error on getting MainTaskBar that shows list out of bounds error when no items (taskbars) were registered --- taskbar.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/taskbar.pas b/taskbar.pas index e000d4c..036b3dc 100644 --- a/taskbar.pas +++ b/taskbar.pas @@ -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