Skip to content

Commit

Permalink
fix: protect method from second load
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jul 22, 2019
1 parent 9fbf9ef commit 6b76a3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
Expand Up @@ -88,6 +88,7 @@ public MethodNode(ClassNode classNode, Method mthData, boolean isVirtual) {

@Override
public void unload() {
regsCount = -1;
if (noCode) {
return;
}
Expand All @@ -106,6 +107,10 @@ public void unload() {

@Override
public void load() throws DecodeException {
if (regsCount != -1) {
// method already loaded
return;
}
try {
if (noCode) {
regsCount = 0;
Expand Down

0 comments on commit 6b76a3c

Please sign in to comment.