mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 06:18:20 +02:00
* The handle of a TCustomForm contains in most cases a TCocoaWindowContent and not directly a NSWindow. This fixes an access violation
git-svn-id: trunk@43791 -
This commit is contained in:
parent
4ba9ae2cdc
commit
a491cb1360
@ -382,8 +382,13 @@ begin
|
||||
cnt.callback := TCocoaWindow(win).callback;
|
||||
win.setContentView(cnt);
|
||||
|
||||
if AParams.WndParent <> 0 then
|
||||
NSWindow(AParams.WndParent).addChildWindow_ordered(win, NSWindowAbove);
|
||||
if (AParams.WndParent <> 0) then
|
||||
begin
|
||||
if (NSObject(AParams.WndParent).isKindOfClass(TCocoaWindowContent)) and (not TCocoaWindowContent(AParams.WndParent).isembedded) then
|
||||
TCocoaWindowContent(AParams.WndParent).window.addChildWindow_ordered(win, NSWindowAbove)
|
||||
else
|
||||
NSWindow(AParams.WndParent).addChildWindow_ordered(win, NSWindowAbove);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user