Index: trunk/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- trunk/psphot/src/psphotExtendedSourceFits.c	(revision 19141)
+++ trunk/psphot/src/psphotExtendedSourceFits.c	(revision 19237)
@@ -264,7 +264,8 @@
           char key[10];
           fprintf (stdout, "continue? ");
-          fgets (key, 8, stdin);
-          if (key[0] == 'n') {
-            savePics = false;
+          if (!fgets (key, 8, stdin)) {
+              psWarning("Couldn't read anything.");
+          } else if (key[0] == 'n') {
+              savePics = false;
           }
         }
