mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-29 21:33:38 +00:00
Merge pull request #222 from realffqq/feat/restore-java-gui
(java gui) fix: add more null checks to options
This commit is contained in:
commit
07a6da5bc8
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue