HostInterface; Fix crash on shutdown if boot fails

This commit is contained in:
Connor McLaughlin 2020-08-11 02:56:12 +10:00
parent 8c472a8258
commit 3a020ef87e
1 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,9 @@ bool HostInterface::BootSystem(const SystemBootParameters& parameters)
if (!System::Boot(parameters))
{
ReportFormattedError("System failed to boot. The log may contain more information.");
DestroySystem();
OnSystemDestroyed();
m_audio_stream.reset();
ReleaseHostDisplay();
return false;
}