Fix NPE for FrameNodes that aren't NEW/FULL

All of the other types have a value of null for their list of
locals/stack elements.

Signed-off-by: Major <major@emulate.rs>
bzip2
Major 5 years ago committed by Graham
parent b391191b75
commit 5e32296905
  1. 4
      asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt

@ -63,8 +63,8 @@ private fun Remapper.mapFrameType(type: Any): Any {
private fun AbstractInsnNode.remap(remapper: Remapper) {
when (this) {
is FrameNode -> {
local = local.map(remapper::mapFrameType)
stack = stack.map(remapper::mapFrameType)
local = local?.map(remapper::mapFrameType)
stack = stack?.map(remapper::mapFrameType)
}
is FieldInsnNode -> {
val originalOwner = owner

Loading…
Cancel
Save