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.
This commit is contained in:
Ben Harris
2023-01-07 19:06:51 +00:00
parent e5d106eb27
commit 68f9fae973

View File

@ -2516,6 +2516,7 @@ static const char *midend_deserialise_internal(
} }
data.ui = me->ourgame->new_ui(data.states[0].state); data.ui = me->ourgame->new_ui(data.states[0].state);
if (data.uistr)
me->ourgame->decode_ui(data.ui, data.uistr); me->ourgame->decode_ui(data.ui, data.uistr);
/* /*