Fix bug in x_window_to_xw: it was not checking that the entry in the
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 22 Nov 1993 03:21:08 +0000 (03:21 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 22 Nov 1993 03:21:08 +0000 (03:21 +0000)
x_window_table was valid before extracting the window handle.

v7/src/microcode/x11base.c

index 4c06f266c62c8c9d5217d5bdc94260eb08ac57b4..a0457998df060264f172a9357d4244e83ddf7247 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: x11base.c,v 1.51 1993/08/17 21:25:39 cph Exp $
+$Id: x11base.c,v 1.52 1993/11/22 03:21:08 gjr Exp $
 
 Copyright (c) 1989-93 Massachusetts Institute of Technology
 
@@ -167,7 +167,7 @@ DEFUN (x_window_to_xw, (window), Window window)
   while (scan < end)
     {
       struct xwindow * xw = (*scan++);
-      if ((XW_WINDOW (xw)) == window)
+      if ((xw != 0) && ((XW_WINDOW (xw)) == window))
        return (xw);
     }
   return (0);