http://www.tienza.es/crux/src/www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz
[xscreensaver] / hacks / phosphor.c
index 6f9fe9170a261d88bf174ce61a31bed7e897ee8e..724bbb5312807fa3c04e196fc367394a95969380 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1999-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1999-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1338,7 +1338,7 @@ static void
 drain_input (p_state *state)
 {
   XtAppContext app = XtDisplayToApplicationContext (state->dpy);
-  if (state->input_available_p)
+  if (state->input_available_p && state->pipe)
     {
       unsigned char s[2];
       int n = read (fileno (state->pipe), (void *) s, 1);