diff --git a/components/virtualtreeview/VirtualTrees.pas b/components/virtualtreeview/VirtualTrees.pas index bb888395db..5fd1152522 100644 --- a/components/virtualtreeview/VirtualTrees.pas +++ b/components/virtualtreeview/VirtualTrees.pas @@ -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');