From 3c7f7c2632c9a7cb47a84ed7db06f0ea408c62eb Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 15:24:12 -0300 Subject: [PATCH] check for nullptr touches, if that even happens --- src/hooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 10d481c..a0d9818 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -93,7 +93,7 @@ class $modify(CCKeyboardDispatcher) { class $modify(CCTouchDispatcher) { void touches(CCSet* touches, CCEvent* event, unsigned int type) { - if (!ImGuiCocos::get().isInitialized()) + if (!ImGuiCocos::get().isInitialized() || !touches) return CCTouchDispatcher::touches(touches, event, type); auto& io = ImGui::GetIO();