Skip to content

Commit b5459f4

Browse files
authored
Fix NPE in CallResolver when MethodSignature.descriptor is null (#168)
1 parent 24dd235 commit b5459f4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

base/src/main/java/proguard/analysis/CallResolver.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ private void initArgumentsAndReturnValue(Call call) {
532532

533533
call.setArguments(arguments);
534534

535-
if (target.descriptor.getReturnType().charAt(0) != TypeConstants.VOID
535+
if (target.descriptor != null
536+
&& target.descriptor.getReturnType().charAt(0) != TypeConstants.VOID
536537
&& particularValueEvaluationSuccessful) {
537538
call.setReturnValue(
538539
PartialEvaluatorUtils.getStackValue(
@@ -542,7 +543,8 @@ private void initArgumentsAndReturnValue(Call call) {
542543

543544
private List<Value> getArguments(
544545
CodeLocation location, MethodSignature invokedMethodSig, boolean isStaticCall) {
545-
if (invokedMethodSig.descriptor.getArgumentTypes() == null) {
546+
if (invokedMethodSig.descriptor == null
547+
|| invokedMethodSig.descriptor.getArgumentTypes() == null) {
546548
log.warn("Argument types list of {} is null!", invokedMethodSig);
547549
return Collections.emptyList();
548550
}

0 commit comments

Comments
 (0)