diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java b/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java index d68ed239b..9267303f4 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/api/internal/SharedApi.java @@ -99,7 +99,12 @@ public class SharedApi { ThreadPoolUtil.shutdownThreadPools(); DebugRenderer.clearRenderables(); - MC_RENDER.clearTargetFrameBuffer(); + + if (MC_RENDER != null) + { + MC_RENDER.clearTargetFrameBuffer(); + } + // shouldn't be necessary, but if we missed closing one of the connections this should make sure they're all closed AbstractDhRepo.closeAllConnections(); // needs to be closed on world shutdown to clear out un-processed chunks