Handle failed displays more gracefully.

This commit is contained in:
Jonathan Naylor 2016-11-22 07:52:47 +00:00
parent 56487dd529
commit beb9a7d545

View file

@ -1144,6 +1144,12 @@ void CMMDVMHost::createDisplay()
m_display = new CNullDisplay; m_display = new CNullDisplay;
} }
if (m_display == NULL) {
LogWarning("No valid display found, disabling");
m_display = new CNullDisplay;
return;
}
bool ret = m_display->open(); bool ret = m_display->open();
if (!ret) { if (!ret) {
delete m_display; delete m_display;