emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f71fad50fc: Fix potential NULL pointer dereference on NS


From: Po Lu
Subject: master f71fad50fc: Fix potential NULL pointer dereference on NS
Date: Thu, 2 Jun 2022 03:48:34 -0400 (EDT)

branch: master
commit f71fad50fc4d10caaf156c37610f78f5edf3a255
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix potential NULL pointer dereference on NS
    
    * src/nsterm.m (ns_mouse_position): Don't test f's tooltip-ness
    if it's NULL.
---
 src/nsterm.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 9a23efe3ac..b7b7bc2ad3 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]