From 129223d50268e5409007c735da9e4931e1540686 Mon Sep 17 00:00:00 2001 From: MrTheShy <49885496+MrTheShy@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:47:26 +0100 Subject: [PATCH] Guard setCaretVisible and setCaretIndex against null movie tickDirectEdit calls into Iggy every tick without checking if the movie is still valid, which crashes inside iggy_w64.dll when the Flash movie gets unloaded or isn't ready yet. --- Minecraft.Client/Common/UI/UIControl_TextInput.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Minecraft.Client/Common/UI/UIControl_TextInput.cpp b/Minecraft.Client/Common/UI/UIControl_TextInput.cpp index 0bfa0bbd3..8e679b7c7 100644 --- a/Minecraft.Client/Common/UI/UIControl_TextInput.cpp +++ b/Minecraft.Client/Common/UI/UIControl_TextInput.cpp @@ -94,6 +94,9 @@ void UIControl_TextInput::SetCharLimit(int iLimit) void UIControl_TextInput::setCaretVisible(bool visible) { + if (!m_parentScene || !m_parentScene->getMovie()) + return; + // Check once whether this SWF's FJ_TextInput actually has a m_mcCaret child. // IggyValuePathMakeNameRef always succeeds (creates a ref to undefined), // so we validate by trying to read a property from the resolved path. @@ -124,6 +127,9 @@ void UIControl_TextInput::setCaretVisible(bool visible) void UIControl_TextInput::setCaretIndex(int index) { + if (!m_parentScene || !m_parentScene->getMovie()) + return; + IggyDataValue result; IggyDataValue value[1]; value[0].type = IGGY_DATATYPE_number;