From a1a4125fd970e2a13fc49155e67f3a94857872e4 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 18 Jan 2023 15:44:25 -0800 Subject: [PATCH] properly react to lack of a mouse cursor --- library/lua/gui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/lua/gui.lua b/library/lua/gui.lua index 9f1db9d7c..530848f61 100644 --- a/library/lua/gui.lua +++ b/library/lua/gui.lua @@ -481,7 +481,7 @@ end function View:getMousePos(view_rect) local rect = view_rect or self.frame_body local x,y = dscreen.getMousePos() - if rect and rect:inClipGlobalXY(x,y) then + if rect and x and rect:inClipGlobalXY(x,y) then return rect:localXY(x,y) end end