Fix crash when SDL context fails to create

This commit is contained in:
sfan5 2024-01-16 18:24:02 +01:00
parent a3ec3a88e8
commit f86b9b93e8
1 changed files with 4 additions and 2 deletions

View File

@ -265,8 +265,10 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
// create window
if (CreationParams.DriverType != video::EDT_NULL)
{
// create the window, only if we do not use the null device
createWindow();
if (!createWindow()) {
Close = true;
return;
}
}