From: <car...@us...> - 2009-12-28 15:43:35
|
Revision: 883 http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=883&view=rev Author: carlobar Date: 2009-12-28 15:43:22 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Prevent an access violation into IDE closing an application that uses InstantObjects. Modified Paths: -------------- trunk/Source/Core/InstantCode.pas trunk/Source/Design/InstantAttributeView.pas Modified: trunk/Source/Core/InstantCode.pas =================================================================== --- trunk/Source/Core/InstantCode.pas 2009-12-28 15:41:25 UTC (rev 882) +++ trunk/Source/Core/InstantCode.pas 2009-12-28 15:43:22 UTC (rev 883) @@ -5189,7 +5189,10 @@ function TInstantCodeClass.GetBaseClass: TInstantCodeClass; begin - Result := FBaseClassLink.Instance; + if Assigned(FBaseClassLink) then + Result := FBaseClassLink.Instance + else + Result := nil; end; function TInstantCodeClass.GetBaseClassName: string; Modified: trunk/Source/Design/InstantAttributeView.pas =================================================================== --- trunk/Source/Design/InstantAttributeView.pas 2009-12-28 15:41:25 UTC (rev 882) +++ trunk/Source/Design/InstantAttributeView.pas 2009-12-28 15:43:22 UTC (rev 883) @@ -447,7 +447,7 @@ procedure TInstantAttributeViewFrame.PopulateInheritedAttributes; begin - if (assigned(Subject)) then + if (assigned(Subject)) and (assigned(Subject.BaseClass)) then LoadAttributeView(InheritedAttributesView, Subject.BaseClass, True); end; |