From dc05f210f5f5a8b17f218808e02444d8e55b1ff0 Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 26 Mar 2013 11:11:31 -0700 Subject: [PATCH] Fix NPEs when modders stupidly register null texture names. --- .../client/renderer/texture/TextureMap.java.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 7d0b5038a7..6739ce600a 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -89,7 +89,15 @@ this.atlasTexture.createTexture(); } -@@ -219,4 +244,37 @@ +@@ -202,6 +227,7 @@ + if (par1Str == null) + { + (new RuntimeException("Don\'t register null!")).printStackTrace(); ++ par1Str = "null"; //Don't allow things to actually register null.. + } + + TextureStitched texturestitched = (TextureStitched)this.textureStichedMap.get(par1Str); +@@ -219,4 +245,37 @@ { return this.missingTextureStiched; }