From e7deed73b56ff34410d06349c07545bd5d09c3f3 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Fri, 21 Jun 2019 22:14:22 +0200 Subject: [PATCH] Fix NPE when jumping to beginning of replay (before player is spawned) --- src/main/java/com/replaymod/replay/InputReplayTimer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/replaymod/replay/InputReplayTimer.java b/src/main/java/com/replaymod/replay/InputReplayTimer.java index 93820f59..236c75ed 100644 --- a/src/main/java/com/replaymod/replay/InputReplayTimer.java +++ b/src/main/java/com/replaymod/replay/InputReplayTimer.java @@ -66,7 +66,7 @@ public class InputReplayTimer extends WrappedTimer { // If we are in a replay, we have to manually process key and mouse events as the // tick speed may vary or there may not be any ticks at all (when the replay is paused) - if (mod.getReplayHandler() != null) { + if (mod.getReplayHandler() != null && mc.world != null && mc.player != null) { //#if MC>=11300 if (mc.currentScreen == null || mc.currentScreen.passEvents) { GLFW.glfwPollEvents();