foxygit / doom Log in
commit 6b217ee03c5155dd751245dc3133167f3bcd7478
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Thu Nov 27 18:58:58 2014 -0500
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Thu Nov 27 18:58:58 2014 -0500

    textscreen: Exit immediately when all windows close.

    The main loop should exit when the last window closes, but the loop
    code was waiting for one event to be received before this took
    effect.

    This fixes #474. Thanks to Alexandre-Xavier for the report.
---
 textscreen/txt_desktop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c
index fe0ae8ee..4c9cf5c1 100644
--- a/textscreen/txt_desktop.c
+++ b/textscreen/txt_desktop.c
@@ -290,6 +290,7 @@ void TXT_GUIMainLoop(void)
         if (num_windows <= 0)
         {
             TXT_ExitMainLoop();
+            continue;
         }

         TXT_DrawDesktop();