Переглянути джерело

* Check component is not nil prior to calling validateinsert

Michaël Van Canneyt 1 рік тому
батько
коміт
f1c4f0c879
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      rtl/objpas/classes/compon.inc

+ 2 - 1
rtl/objpas/classes/compon.inc

@@ -482,7 +482,8 @@ end;
 Procedure TComponent.ValidateContainer(AComponent: TComponent);
 
 begin
-  AComponent.ValidateInsert(Self);
+  if Assigned(aComponent) then
+    AComponent.ValidateInsert(Self);
 end;