From c33539ed198a16f1df6130719f48c22dedc91b22 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 5 Sep 2026 22:32:42 +0700 Subject: [PATCH] Fix wrong nesting for catch --- src/engine.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine.clj b/src/engine.clj index a1ecf8f..005cb4a 100644 --- a/src/engine.clj +++ b/src/engine.clj @@ -88,11 +88,11 @@ (rl/with-drawing! (draw config updated-state) (w/watch! (watch-fn config updated-state)) - (swap! game-state updated-state) - (catch Throwable t - (doseq [buf @buffered-objs] - (restore! buf)) - (report-exception! t)))))))) + (reset! game-state updated-state))) + (catch Throwable t + (doseq [buf @buffered-objs] + (when buf (restore! buf))) + (report-exception! t)))))) (try (when unload (doseq [[_ tex] @texture-cache]