2
0
Эх сурвалжийг харах

* Fixed Issue ID38920: twriter crashes on readonly nil component

git-svn-id: trunk@49389 -
michael 4 жил өмнө
parent
commit
61cd38e6db

+ 3 - 2
rtl/objpas/classes/writer.inc

@@ -892,8 +892,9 @@ begin
     if PropType^.Kind<>tkClass then
       exit;
     ObjValue := TObject(GetObjectProp(Instance, PropInfo));
-    if not ObjValue.InheritsFrom(TComponent) or
-       not (csSubComponent in TComponent(ObjValue).ComponentStyle) then
+    if not (assigned(ObjValue) and
+            ObjValue.InheritsFrom(TComponent) and
+            (csSubComponent in TComponent(ObjValue).ComponentStyle)) then
       exit;
   end;