GUI: Fix crash on switch SDL Surface -> OpenGL

This commit is contained in:
Eugene Sandulenko
2022-10-10 00:15:00 +02:00
parent 1273fb34de
commit 17841ca8a2
+5
View File
@@ -1903,6 +1903,11 @@ void OptionsDialog::reflowLayout() {
void OptionsDialog::setupGraphicsTab() {
if (_graphicsTabId != -1) {
// Since we do not create shader controls, the rebuild is required
// Fixes crash when switching from SDL Surface to OpenGL
if (!_shader && g_system->hasFeature(OSystem::kFeatureShaders)) {
rebuild();
}
setGraphicSettingsState(_enableGraphicSettings);
}
if (!_fullscreenCheckbox)