From 59ed6b5a2fe7a623eddb70276c0edffcfffc2215 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Wed, 9 Jan 2013 13:12:37 +0800 Subject: [PATCH] return to caller when there is no window to show in UIManager --- frontend/ui/ui.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/ui/ui.lua b/frontend/ui/ui.lua index a6be518ec..f795f79d0 100644 --- a/frontend/ui/ui.lua +++ b/frontend/ui/ui.lua @@ -154,9 +154,10 @@ function UIManager:run() --DEBUG("dirty stack", self._dirty) --DEBUG("---------------------------------------------------") - -- stop when we have no window to show (bug) + -- stop when we have no window to show if #self._window_stack == 0 then - error("no dialog left to show, would loop endlessly") + DEBUG("no dialog left to show, would loop endlessly") + return nil end -- repaint dirty widgets