From 68f9fae973e2ffb6c0b9ed1e0761d3a0768455ad Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 7 Jan 2023 19:06:51 +0000 Subject: [PATCH] When loading, don't decode_ui unless we have a UI If the save file doesn't have a UI line, it's not sensible to try to decode it. --- midend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/midend.c b/midend.c index 6c1a599..a14004d 100644 --- a/midend.c +++ b/midend.c @@ -2516,7 +2516,8 @@ static const char *midend_deserialise_internal( } data.ui = me->ourgame->new_ui(data.states[0].state); - me->ourgame->decode_ui(data.ui, data.uistr); + if (data.uistr) + me->ourgame->decode_ui(data.ui, data.uistr); /* * Run the externally provided check function, and abort if it