diff options
author | Po Lu <luangruo@yahoo.com> | 2022-06-02 15:48:12 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-06-02 15:48:12 +0800 |
commit | f71fad50fc4d10caaf156c37610f78f5edf3a255 (patch) | |
tree | 2f1db454d5cbce7c339c1b732c200958f65a9ae3 /src/nsterm.m | |
parent | caf8a83730c82155b55b63de18e019c276dee2de (diff) | |
download | emacs-f71fad50fc4d10caaf156c37610f78f5edf3a255.tar.gz |
Fix potential NULL pointer dereference on NS
* src/nsterm.m (ns_mouse_position): Don't test f's tooltip-ness
if it's NULL.
Diffstat (limited to 'src/nsterm.m')
-rw-r--r-- | src/nsterm.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 9a23efe3ac1..b7b7bc2ad34 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2365,7 +2365,7 @@ ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, if (!FRAME_NS_P (f)) f = NULL; - if (FRAME_TOOLTIP_P (f)) + if (f && FRAME_TOOLTIP_P (f)) f = dpyinfo->last_mouse_frame; /* While dropping, use the last mouse frame only if there is no |