Skip to content

Commit

Permalink
fix: null camera crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Sep 15, 2022
1 parent 52046a9 commit e4105a4
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public void renderLevelLast(RenderLevelStageEvent event) {
return;
}
Camera camera = mc.getEntityRenderDispatcher().camera;
//noinspection ConstantConditions the IDE inspects this as not possible to be null. There has been at least one error report proving this to be false.
if(camera == null) return;
PoseStack poseStack = event.getPoseStack();
worldMatrix = event.getProjectionMatrix().copy();
worldMatrix.multiply(poseStack.last().pose());
Expand Down

0 comments on commit e4105a4

Please sign in to comment.