From 10b43ac3fd25e09cfe100497d88e1ddb9f040770 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 24 Aug 2004 10:54:39 +0000 Subject: [PATCH] * xfns.c (x_window_to_frame, x_any_window_to_frame) (x_non_menubar_window_to_frame, x_menubar_window_to_frame) (x_top_window_to_frame): Return 0 if wdesc is None. --- src/ChangeLog | 6 ++++++ src/xfns.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index cbf06bc480f..35731460a70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-08-24 Jan Dj,Ad(Brv + + * xfns.c (x_window_to_frame, x_any_window_to_frame) + (x_non_menubar_window_to_frame, x_menubar_window_to_frame) + (x_top_window_to_frame): Return 0 if wdesc is None. + 2004-08-22 Richard M. Stallman * process.c (process_send_signal) [SIGNALS_VIA_CHARACTERS, diff --git a/src/xfns.c b/src/xfns.c index 3f484f3935a..8368e62a445 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -281,6 +281,8 @@ x_window_to_frame (dpyinfo, wdesc) Lisp_Object tail, frame; struct frame *f; + if (wdesc == None) return 0; + for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); @@ -330,6 +332,8 @@ x_any_window_to_frame (dpyinfo, wdesc) struct frame *f, *found; struct x_output *x; + if (wdesc == None) return NULL; + found = NULL; for (tail = Vframe_list; GC_CONSP (tail) && !found; tail = XCDR (tail)) { @@ -384,6 +388,8 @@ x_non_menubar_window_to_frame (dpyinfo, wdesc) struct frame *f; struct x_output *x; + if (wdesc == None) return 0; + for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); @@ -430,6 +436,8 @@ x_menubar_window_to_frame (dpyinfo, wdesc) struct frame *f; struct x_output *x; + if (wdesc == None) return 0; + for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); @@ -475,6 +483,8 @@ x_top_window_to_frame (dpyinfo, wdesc) struct frame *f; struct x_output *x; + if (wdesc == None) return 0; + for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); -- 2.39.2