From: Po Lu Date: Thu, 2 Jun 2022 07:48:12 +0000 (+0800) Subject: Fix potential NULL pointer dereference on NS X-Git-Tag: emacs-29.0.90~1910^2~287 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f71fad50fc4d10caaf156c37610f78f5edf3a255;p=emacs.git Fix potential NULL pointer dereference on NS * src/nsterm.m (ns_mouse_position): Don't test f's tooltip-ness if it's NULL. --- 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