mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-04 11:20:38 +01:00
carbon: Fixes crash in IDE with OpenGL, see bug #30440
git-svn-id: trunk@52779 -
This commit is contained in:
parent
36748d73b7
commit
febc687143
@ -228,7 +228,8 @@ var
|
||||
Ref: ControlRef;
|
||||
Info: PAGLControlInfo;
|
||||
begin
|
||||
if not AWinControl.HandleAllocated then exit;
|
||||
if not AWinControl.HandleAllocated then Exit;
|
||||
if csDesigning in AWinControl.ComponentState then Exit;
|
||||
Ref := ControlRef(TCarbonControl(AWinControl.Handle).Widget);
|
||||
Info := GetAGLControlInfo(Ref);
|
||||
if Info=nil then exit;
|
||||
|
||||
@ -628,11 +628,13 @@ var
|
||||
OpenGlControl: TCustomOpenGLControl;
|
||||
AttrControl: TCustomOpenGLControl;
|
||||
begin
|
||||
if csDesigning in AWinControl.ComponentState then begin
|
||||
if csDesigning in AWinControl.ComponentState then
|
||||
begin
|
||||
// do not use "inherited CreateHandle", because the LCL changes the hierarchy at run time
|
||||
Result:=TWSWinControlClass(ClassParent).CreateHandle(AWinControl,AParams);
|
||||
end
|
||||
else begin
|
||||
else
|
||||
begin
|
||||
OpenGlControl:=AWinControl as TCustomOpenGLControl;
|
||||
if OpenGlControl.SharedControl<>nil then
|
||||
AttrControl:=OpenGlControl.SharedControl
|
||||
|
||||
Loading…
Reference in New Issue
Block a user