Merge pull request #222 from realffqq/feat/restore-java-gui
Some checks are pending
Build (Linux, x86_64) / build-linux (push) Waiting to run
Build (Linux, x86_64) / build-linux-debug (push) Waiting to run

(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
commit 07a6da5bc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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