cocoa: preventing call of keyup for textfield, in case the callback was cleared

git-svn-id: trunk@57018 -
This commit is contained in:
dmitry 2018-01-09 03:07:46 +00:00
parent a77eb48d0c
commit cb31fbad0e

View File

@ -2343,7 +2343,9 @@ begin
// NSTextField doesn't provide keyDown, so emulate it here
callback.KeyEvent(event, True);
// keyUp now
callback.KeyEvent(event);
// by this time the control might have been released and callback cleared
if Assigned(callback) then
callback.KeyEvent(event);
end;
inherited keyUp(event);
end;