From 8f580be3fa591bf854bb04a301b37f8a97191107 Mon Sep 17 00:00:00 2001 From: will wade Date: Fri, 19 Jun 2026 19:06:55 +0100 Subject: [PATCH] Fix game mode crash: null-guard node in HandleEditEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TextOutputAction::execute passes nullptr as the cause node to editOutput (ControlManager.cpp:212). This propagates through the OnEditEvent subscription to CGameModule::HandleEditEvent, which unconditionally dereferences node->offset() and crashes with EXC_BAD_ACCESS at address 0x54 (the offset of m_Offset within CDasherNode). This caused the 4th TestFlight crash on DasherApp build 32 (iPhone 14,2 / iOS 26.5) — user comment: 'Started game mode'. The crash fires when the first character is typed after entering game mode. Fix: return early if node is null. A null-node edit event carries no useful information for game-mode tracking (which needs the node offset to check whether the user typed the correct target character at the right position). Signed-off-by: will wade --- src/DasherCore/GameModule.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DasherCore/GameModule.cpp b/src/DasherCore/GameModule.cpp index 3d3911ee..2801265e 100644 --- a/src/DasherCore/GameModule.cpp +++ b/src/DasherCore/GameModule.cpp @@ -54,6 +54,7 @@ CGameModule::~CGameModule() { void CGameModule::HandleEditEvent(CEditEvent::EditEventType type, const std::string& strText, CDasherNode* node) { if (!m_pAlph) return; // Game Mode currently not running + if (!node) return; // TextOutputAction passes nullptr as the cause node const int iOffset(node->offset()); switch (type) { // Added a new character (Stepped one node forward)