1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

Fix potential NULL pointer dereference on NS

* src/nsterm.m (ns_mouse_position): Don't test f's tooltip-ness
if it's NULL.
This commit is contained in:
Po Lu 2022-06-02 15:48:12 +08:00
parent caf8a83730
commit f71fad50fc

View file

@ -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