fix(ags): close all when bar isn't found

This commit is contained in:
matt1432 2023-11-27 15:39:55 -05:00
parent d8881b9eca
commit 0194b45dc7

View file

@ -185,8 +185,8 @@ class Pointers extends Service {
window?.closeOnUnfocus === clickStage;
});
if (pos.x > bar.x && pos.x < bar.x + bar.w &&
pos.y > bar.y && pos.y < bar.y + bar.h) {
if (pos.x > bar?.x && pos.x < bar?.x + bar?.w &&
pos.y > bar?.y && pos.y < bar?.y + bar?.h) {
// Don't handle clicks when on bar
// TODO: make this configurable