diff src/macterm.c @ 49346:91abf17b00d5

* macterm.c (XTread_socket): Checks for valid, visible window before sending a scroll-wheel event.
author Steven Tamm <steventamm@mac.com>
date Mon, 20 Jan 2003 16:53:38 +0000
parents c49640262de0
children 0ffb4e489776
line wrap: on
line diff
--- a/src/macterm.c	Mon Jan 20 16:15:42 2003 +0000
+++ b/src/macterm.c	Mon Jan 20 16:53:38 2003 +0000
@@ -12644,6 +12644,13 @@
 		Point point;
 		WindowPtr window_ptr = FrontNonFloatingWindow ();
 		struct mac_output *mwp = (mac_output *) GetWRefCon (window_ptr);
+		if (!IsValidWindowPtr (window_ptr))
+		  {
+		    SysBeep(1);
+		    UNBLOCK_INPUT;
+		    return 0;
+		  }
+
 		GetEventParameter(eventRef, kEventParamMouseWheelDelta,
 				  typeSInt32, NULL, sizeof (SInt32),
 				  NULL, &delta);