From 70fd75606840cc56d0bf4c03089cf16e3d194818 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Tue, 29 Apr 2025 14:28:10 -0700 Subject: [PATCH] Fix crashes (better) --- Craftimizer/Windows/SynthHelper.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Craftimizer/Windows/SynthHelper.cs b/Craftimizer/Windows/SynthHelper.cs index 4060db0..7d2de8a 100644 --- a/Craftimizer/Windows/SynthHelper.cs +++ b/Craftimizer/Windows/SynthHelper.cs @@ -528,7 +528,10 @@ public sealed unsafe class SynthHelper : Window, IDisposable private void OnUseAction(ActionType action) { - if (!ShouldOpen || IsCollapsed) + Addon = (AddonSynthesis*)Service.GameGui.GetAddonByName("Synthesis"); + if (Addon == null) + return; + if (Addon->AtkUnitBase.WindowNode == null) return; (_, CurrentState) = new SimNoRandom().Execute(GetCurrentState(), action);