mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-03 16:23:50 +02:00
LCL: fixed some nil checks
git-svn-id: trunk@24397 -
This commit is contained in:
parent
29ab9f7299
commit
d69055d322
@ -292,7 +292,7 @@ var
|
|||||||
OldChange: TNotifyEvent;
|
OldChange: TNotifyEvent;
|
||||||
OldCurrent: Integer;
|
OldCurrent: Integer;
|
||||||
begin
|
begin
|
||||||
if not FIcon.Empty then
|
if Assigned(FIcon) and not FIcon.Empty then
|
||||||
begin
|
begin
|
||||||
if FBigIconHandle = 0 then
|
if FBigIconHandle = 0 then
|
||||||
begin
|
begin
|
||||||
@ -319,7 +319,7 @@ var
|
|||||||
OldChange: TNotifyEvent;
|
OldChange: TNotifyEvent;
|
||||||
OldCurrent: Integer;
|
OldCurrent: Integer;
|
||||||
begin
|
begin
|
||||||
if not FIcon.Empty then
|
if Assigned(FIcon) and not FIcon.Empty then
|
||||||
begin
|
begin
|
||||||
if FSmallIconHandle = 0 then
|
if FSmallIconHandle = 0 then
|
||||||
begin
|
begin
|
||||||
|
@ -61,9 +61,9 @@ begin
|
|||||||
{if (FHorzScrollBar.Range>Result.Right)
|
{if (FHorzScrollBar.Range>Result.Right)
|
||||||
or (FVertScrollBar.Range>Result.Bottom) then
|
or (FVertScrollBar.Range>Result.Bottom) then
|
||||||
DebugLn(['TScrollingWinControl.GetLogicalClientRect Client=',ClientWidth,'x',ClientHeight,' Ranges=',FHorzScrollBar.Range,'x',FVertScrollBar.Range]);}
|
DebugLn(['TScrollingWinControl.GetLogicalClientRect Client=',ClientWidth,'x',ClientHeight,' Ranges=',FHorzScrollBar.Range,'x',FVertScrollBar.Range]);}
|
||||||
if (FHorzScrollBar.Range > Result.Right) then
|
if Assigned(FHorzScrollBar) and (FHorzScrollBar.Range > Result.Right) then
|
||||||
Result.Right := FHorzScrollBar.Range;
|
Result.Right := FHorzScrollBar.Range;
|
||||||
if (FVertScrollBar.Range > Result.Bottom) then
|
if Assigned(FVertScrollBar) and (FVertScrollBar.Range > Result.Bottom) then
|
||||||
Result.Bottom := FVertScrollBar.Range;
|
Result.Bottom := FVertScrollBar.Range;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user