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,7 +2516,8 @@ 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);
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 * Run the externally provided check function, and abort if it