From 74b8c6d184c0461f27c4ba5cd951f440833ea4c9 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 3 Oct 2025 08:31:43 +0900 Subject: [PATCH] Possible crash fix --- core/src/mindustry/core/Control.java | 6 ++++-- core/src/mindustry/graphics/MinimapRenderer.java | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index 252327a0f9..e663f8c5d1 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -502,8 +502,10 @@ public class Control implements ApplicationListener, Loadable{ } }); - //blocks placed after WorldLoadEvent didn't queue an update, so fix that. - renderer.minimap.updateAll(); + Core.app.post(() -> { + //blocks placed after WorldLoadEvent didn't queue an update, so fix that. + renderer.minimap.updateAll(); + }); } }else{ state.set(State.playing); diff --git a/core/src/mindustry/graphics/MinimapRenderer.java b/core/src/mindustry/graphics/MinimapRenderer.java index 163b5ed1f2..a368cca47b 100644 --- a/core/src/mindustry/graphics/MinimapRenderer.java +++ b/core/src/mindustry/graphics/MinimapRenderer.java @@ -309,6 +309,7 @@ public class MinimapRenderer{ } public void updateAll(){ + if(pixmap.isDisposed() || texture.isDisposed()) return; for(Tile tile : world.tiles){ pixmap.set(tile.x, pixmap.height - 1 - tile.y, colorFor(tile)); }