Merge pull request #222 from realffqq/feat/restore-java-gui

(java gui) fix: add more null checks to options
This commit is contained in:
Tropical
2026-03-13 14:00:13 -05:00
committed by GitHub

View File

@@ -279,12 +279,14 @@ void Options::toggle(const Options::Option *option, int dir)
if (option == Option::GRAPHICS)
{
fancyGraphics = !fancyGraphics;
minecraft->levelRenderer->allChanged();
// 4jcraft: ensure level exists before applying
if(minecraft->level) minecraft->levelRenderer->allChanged();
}
if (option == Option::AMBIENT_OCCLUSION)
{
ambientOcclusion = !ambientOcclusion;
minecraft->levelRenderer->allChanged();
// 4jcraft: ensure level exists before applying
if(minecraft->level) minecraft->levelRenderer->allChanged();
}
// 4J-PB - don't do the file save on the xbox