diff options
author | makamys <makamys@outlook.com> | 2021-05-19 11:40:20 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-19 11:40:20 +0200 |
commit | 3036e7146ed24d7e89e0065b9c9be1319c26f6f0 (patch) | |
tree | c088400b848415c816d2226dbe61a936ec7de759 /src | |
parent | 8b13edf3ae85ad5cd2777bdc707502d232bcbc2b (diff) | |
download | Neodymium-3036e7146ed24d7e89e0065b9c9be1319c26f6f0.tar.gz Neodymium-3036e7146ed24d7e89e0065b9c9be1319c26f6f0.tar.bz2 Neodymium-3036e7146ed24d7e89e0065b9c9be1319c26f6f0.zip |
Fix NPE that can happen in onWorldUnload
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/lodmod/LODMod.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/makamys/lodmod/LODMod.java b/src/main/java/makamys/lodmod/LODMod.java index cdb0fdf..6fb5b8d 100644 --- a/src/main/java/makamys/lodmod/LODMod.java +++ b/src/main/java/makamys/lodmod/LODMod.java @@ -59,8 +59,10 @@ public class LODMod public void onWorldUnload(WorldEvent.Unload event) { if(!event.world.isRemote) return; - renderer.destroy(); - renderer = null; + if(renderer != null) { + renderer.destroy(); + renderer = null; + } } public static boolean isActive() { |