KngStr 4 年 前
コミット
c4c0d59b32
1 ファイル変更4 行追加1 行削除
  1. 4 1
      Source/ksFmxUtils.pas

+ 4 - 1
Source/ksFmxUtils.pas

@@ -19,8 +19,11 @@ begin
     Exit;
   if Assigned(AFmxObject.Owner) then
     AFmxObject.Owner.RemoveComponent(AFmxObject);
-  if Assigned(AFmxObject.Parent) then
+  if Assigned(AFmxObject.Parent) then begin
+    // fix release error in 10.4, eg: TMemo on TFrame, Windows.
+    AFmxObject.SetRoot(nil);
     AFmxObject.Parent := nil;
+  end;
   FreeObject(AFmxObject);
 end;