mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-04 04:02:27 +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)
|
if (option == Option::GRAPHICS)
|
||||||
{
|
{
|
||||||
fancyGraphics = !fancyGraphics;
|
fancyGraphics = !fancyGraphics;
|
||||||
minecraft->levelRenderer->allChanged();
|
// 4jcraft: ensure level exists before applying
|
||||||
|
if(minecraft->level) minecraft->levelRenderer->allChanged();
|
||||||
}
|
}
|
||||||
if (option == Option::AMBIENT_OCCLUSION)
|
if (option == Option::AMBIENT_OCCLUSION)
|
||||||
{
|
{
|
||||||
ambientOcclusion = !ambientOcclusion;
|
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
|
// 4J-PB - don't do the file save on the xbox
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue