lcl: carbon: fixed crash in uptree

git-svn-id: trunk@54535 -
This commit is contained in:
mattias 2017-04-06 09:22:25 +00:00
parent 0ddb1e74c5
commit 3fac8b15a6

View File

@ -31,7 +31,7 @@ uses
MacOSAll,
// wdgetset
WSLCLClasses, Classes, SysUtils, Controls, LCLType, LCLProc, Graphics, Contnrs,
AVL_Tree, LMessages, LCLMessageGlue;
Laz_AVL_Tree, LMessages, LCLMessageGlue;
var
LAZARUS_FOURCC: FourCharCode; // = 'Laz ';
@ -348,7 +348,11 @@ function RegisterObjectEventHandler(AHandler: TCarbonObjectEventHandlerProc): Ev
var
Node: TUPPAVLTreeNode;
begin
if UPPTree = nil then UPPTree := TAVLTree.Create;
if UPPTree = nil then
begin
UPPTree := TAVLTree.Create;
UPPTree.NodeClass:=TUPPAVLTreeNode;
end;
Node := TUPPAVLTreeNode(UPPTree.Find(AHandler));
if Node = nil then