Added NULL check for missing encodingPreset (fixes #288)

This commit is contained in:
LindaJuffermans
2020-07-28 11:23:04 +02:00
committed by Jonas Herzig
parent 621587c65e
commit 9c3c76e70d

View File

@@ -487,10 +487,8 @@ public class GuiRenderSettings extends GuiScreen implements Closeable {
renderMethodDropdown.setSelected(settings.getRenderMethod());
}
RenderSettings.EncodingPreset encodingPreset = settings.getEncodingPreset();
if (!encodingPreset.isSupported()) {
encodingPreset = null;
}
if (encodingPreset == null) {
/* encodingPreset can be null from a previously supported and later removed preset */
if (encodingPreset == null || !encodingPreset.isSupported()) {
encodingPreset = getDefaultRenderSettings().getEncodingPreset();
}
encodingPresetDropdown.setSelected(encodingPreset);