Skip to content

Commit dc0673d

Browse files
committed
fix startup crash
1 parent 17af590 commit dc0673d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ ImGuiKey cocosToImGuiKey(cocos2d::enumKeyCodes key) {
488488

489489
class $modify(CCKeyboardDispatcher) {
490490
bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool repeat, double a4) {
491+
if(!DevTools::get()->isSetup()) return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, repeat, a4);
492+
491493
auto& io = ImGui::GetIO();
492494
const auto imKey = cocosToImGuiKey(key);
493495
if (imKey != ImGuiKey_None) {

0 commit comments

Comments
 (0)