Skip to content

Commit

Permalink
Fix VM error if getPrimaryDefinedTextures is given no argument
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Dec 10, 2023
1 parent 1d912f2 commit 67ddf10
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -720,6 +720,9 @@ private LuaValue getTextureValue(TextureCustomization tex) {
@LuaWhitelist
@LuaMethodDoc("model_part.get_primary_defined_textures")
public Object getPrimaryDefinedTextures(Integer value) {
if (value == null) {
throw new LuaError("Illegal argument nil to getPrimaryDefinedTextures, requires an int");
}
if (customization.primaryTexture == null) {
LuaTable tbl = new LuaTable();
FiguraTexture[] arr = this.textures.get(value).textures;
Expand Down

0 comments on commit 67ddf10

Please sign in to comment.