Prevent immediate crash when TextureAtlasSprite constructor throws
Fixes #79
This commit is contained in:
parent
74c2c28a66
commit
48f9ad86f0
|
|
@ -118,7 +118,10 @@ public class ModernFixPlatformHooksImpl {
|
||||||
try {
|
try {
|
||||||
return (TextureAtlasSprite)textureAtlasSpriteConstruct.invokeExact(atlasTexture, textureInfo, mipmapLevel, atlasWidth, atlasHeight, spriteX, spriteY, image);
|
return (TextureAtlasSprite)textureAtlasSpriteConstruct.invokeExact(atlasTexture, textureInfo, mipmapLevel, atlasWidth, atlasHeight, spriteX, spriteY, image);
|
||||||
} catch(Throwable e) {
|
} catch(Throwable e) {
|
||||||
throw new AssertionError("MethodHandle failed", e);
|
if(e instanceof RuntimeException)
|
||||||
|
throw (RuntimeException)e;
|
||||||
|
else
|
||||||
|
throw new RuntimeException("TextureAtlasSprite construction failed", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user