mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-25 04:17:22 +01:00
VirtualTrees: fix AV in AutoScale if handle cannot be allocated (e.g. Parent is not set)
git-svn-id: trunk@58304 -
This commit is contained in:
parent
22cab1ecb2
commit
e38d3c9b03
@ -25604,7 +25604,7 @@ procedure TBaseVirtualTree.AutoScale();
|
||||
var
|
||||
lTextHeight: Cardinal;
|
||||
begin
|
||||
if (toAutoChangeScale in TreeOptions.AutoOptions) then
|
||||
if (toAutoChangeScale in TreeOptions.AutoOptions) and HandleAllocated then
|
||||
begin
|
||||
Canvas.Font.Assign(Self.Font);
|
||||
lTextHeight := Canvas.TextHeight('Tg');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user