From fbbf4a19411bb66e5f3dbf28eb1b0b78e06f4dee Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Wed, 30 Sep 2026 23:53:54 +0300
Subject: [PATCH 28/28] 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 6397cdda17..500592c4c3 100644
--- a/client/tilespec.c
+++ b/client/tilespec.c
@@ -1323,7 +1323,11 @@ bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id,
     strvec_destroy(list);
 
     if (tileset == NULL) {
-      tileset_error(LOG_FATAL, NULL, _("No usable default tileset found, aborting!"));
+      if (global_default) {
+        tileset_error(LOG_FATAL, NULL, _("No usable default tileset found, aborting!"));
+      }
+
+      return FALSE;
     }
 
     log_verbose("Trying tileset \"%s\".", tileset->name);
-- 
2.53.0

