Skip to content

Commit

Permalink
check for nullptr touches, if that even happens
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool authored Oct 15, 2023
1 parent 2f98cc5 commit 3c7f7c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3c7f7c2

Please sign in to comment.