From: Steven M. <sr...@us...> - 2005-12-07 20:33:47
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31818 Modified Files: InstantExplorer.pas Log Message: Fix for crashes occurring when the FNodeType is 'ntContainer' and FInstance is not a valid object. Index: InstantExplorer.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantExplorer.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InstantExplorer.pas 24 Nov 2005 23:14:11 -0000 1.5 --- InstantExplorer.pas 7 Dec 2005 20:33:39 -0000 1.6 *************** *** 268,272 **** FName := AName; FInstance := AInstance; ! if FInstance is TInstantObject then TInstantObject(FInstance).AddRef; FValue := AValue; --- 268,272 ---- FName := AName; FInstance := AInstance; ! if (FNodeType = ntObject) and (FInstance is TInstantObject) then TInstantObject(FInstance).AddRef; FValue := AValue; *************** *** 275,279 **** destructor TInstantExplorerNodeData.Destroy; begin ! if FInstance is TInstantObject then TInstantObject(FInstance).Free; inherited; --- 275,279 ---- destructor TInstantExplorerNodeData.Destroy; begin ! if (FNodeType = ntObject) and (FInstance is TInstantObject) then TInstantObject(FInstance).Free; inherited; |