mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 10:00:32 +02:00
Fixes an index out of bounds error in TTrayIcon and adds more debug info to TNotebook
git-svn-id: trunk@29126 -
This commit is contained in:
parent
ac124baa55
commit
32420f5e83
@ -3,7 +3,7 @@
|
||||
{******************************************************************************
|
||||
TCustomTrayIcon
|
||||
******************************************************************************
|
||||
|
||||
Felipe Monteiro de Carvalho
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
@ -337,6 +337,7 @@ begin
|
||||
if FIcons=AValue then Exit;
|
||||
FIcons.Assign(AValue);
|
||||
if Visible then InternalUpdate();
|
||||
FCurAnimationStep := 0; // Avoids index out-of-bounds errors when changing to a new imagelist
|
||||
end;
|
||||
|
||||
procedure TCustomTrayIcon.SetPopUpMenu(const AValue: TPopupMenu);
|
||||
|
@ -146,7 +146,7 @@ end;
|
||||
function TNotebook.GetPage(AIndex: Integer): TPage;
|
||||
begin
|
||||
if (AIndex < 0) or (AIndex >= FPageList.Count) then
|
||||
RaiseGDBException('TUntabbedNotebook.GetCustomPage Index out of bounds');
|
||||
RaiseGDBException(Format('TNotebook.GetCustomPage Index out of bounds. AIndex=%d', [AIndex]));
|
||||
Result := TPage(FPageList.Items[AIndex]);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user