allow closing non-existent widget but throw a warning

This commit is contained in:
chrox
2014-11-06 14:00:47 +08:00
parent 461afa25a8
commit dd308f6be1

View File

@@ -153,6 +153,10 @@ end
-- unregister a widget
function UIManager:close(widget)
if not widget then
DEBUG("widget not exist to be closed")
return
end
DEBUG("close widget", widget.id)
Input.disable_double_tap = DGESDETECT_DISABLE_DOUBLE_TAP
local dirty = false