From c3b3bb071071eea4e99e998fe5528e84a4fe0164 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Wed, 30 Sep 2026 23:53:54 +0300
Subject: [PATCH 72/72] tilespec_try_read(): Abort only if looking for global
 default tileset

tilespec_try_read() aborts if it can't find requested tileset.
Correct that to happen only if function is used to look
for global default tileset, i.e., when there's no tileset at all
which client could use. Do not abort when options code
uses the function to look for default tileset for specific
topologies.

See RM #2307

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/tilespec.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/client/tilespec.c b/client/tilespec.c
index 6827238338..201bd5b219 100644
--- a/client/tilespec.c
+++ b/client/tilespec.c
@@ -1369,7 +1369,11 @@ bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id,
     modpack_tileset_cache_iterate(ts_cb, &topo_id);
 
     if (tileset == nullptr) {
-      tileset_error(LOG_FATAL, nullptr, _("No usable default tileset found, aborting!"));
+      if (global_default) {
+        tileset_error(LOG_FATAL, nullptr, _("No usable default tileset found, aborting!"));
+      }
+
+      return FALSE;
     }
 
     log_verbose("Trying tileset \"%s\".", tileset->name);
-- 
2.53.0

