Handle failed displays more gracefully.
This commit is contained in:
parent
56487dd529
commit
beb9a7d545
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue