From 31639cce3989572013195ee0525ad8cc370fdd14 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 7 Jun 2014 13:36:58 +0800 Subject: [PATCH] check window stack before sending events This should fix FC on Android with "Start with last opened file" checked --- frontend/ui/uimanager.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index cd5fd409b..931b54bdc 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -116,6 +116,7 @@ end -- transmit an event to registered widgets function UIManager:sendEvent(event) + if #self._window_stack == 0 then return end -- top level widget has first access to the event if self._window_stack[#self._window_stack].widget:handleEvent(event) then return