mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 07:57:13 +01:00
Cocoa: Prevent crash on non-existing cursor. Issue #33478, patch from Anton Kavalenka.
git-svn-id: trunk@57551 -
This commit is contained in:
parent
f6c1395ad6
commit
a5ca0547dd
@ -1247,6 +1247,7 @@ function TLCLCommonCallback.ResetCursorRects: Boolean;
|
||||
var
|
||||
ACursor: TCursor;
|
||||
View: NSView;
|
||||
cr:TCocoaCursor;
|
||||
begin
|
||||
Result := False;
|
||||
View := CocoaUtils.GetNSObjectView(Owner);
|
||||
@ -1261,7 +1262,11 @@ begin
|
||||
end;
|
||||
Result := ACursor <> crDefault;
|
||||
if Result then
|
||||
View.addCursorRect_cursor(View.visibleRect, TCocoaCursor(Screen.Cursors[ACursor]).Cursor);
|
||||
begin
|
||||
cr:=TCocoaCursor(Screen.Cursors[ACursor]);
|
||||
if assigned(cr) then
|
||||
View.addCursorRect_cursor(View.visibleRect, cr.Cursor);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user