version 1.4b26
[polyglot.git] / gui.cpp
diff --git a/gui.cpp b/gui.cpp
index dac260f..71d0cc0 100644 (file)
--- a/gui.cpp
+++ b/gui.cpp
@@ -68,7 +68,11 @@ bool gui_get_non_blocking(gui_t * gui, char string[], int size) {
        return false;
    }
 #else
-   if ((gui->io).GetBuffer(string)) {
+   if((gui->io).EOF_()){
+        my_log("POLYGLOT *** EOF from GUI ***\n");
+        quit();
+        return true; // we never get here
+   }else if ((gui->io).GetBuffer(string)) {
        my_log("GUI->Adapter: %s\n", string);
        return true;
    } else {
@@ -83,6 +87,10 @@ bool gui_get_non_blocking(gui_t * gui, char string[], int size) {
 void gui_get(gui_t * gui, char string[], int size) {
     bool data_available;
 #ifdef _WIN32
+    if((gui->io).EOF_()){
+        my_log("POLYGLOT *** EOF from GUI ***\n");
+        quit();
+    }
     (gui->io).LineInput(string);
     my_log("GUI->Adapter: %s\n", string);
 #else