fix server shutdown null pointer

This commit is contained in:
James Seibel
2023-10-30 18:43:04 -05:00
parent 645567c474
commit 4c5204172e
@@ -101,8 +101,13 @@ public class ServerApi
{
LOGGER.debug("Server World " + SharedApi.getAbstractDhWorld() + " unloading");
SharedApi.getAbstractDhWorld().close();
SharedApi.setDhWorld(null);
// shutdown the world if it isn't already
AbstractDhWorld dhWorld = SharedApi.getAbstractDhWorld();
if (dhWorld != null)
{
dhWorld.close();
SharedApi.setDhWorld(null);
}
}