Skip to content

Commit

Permalink
Fix potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Jan 3, 2014
1 parent c412d74 commit 9d89169
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/at/jclehner/appopsxposed/ApkVariant.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,18 @@ protected void onAfterHookedMethod(MethodHookParam param) throws Throwable
final Bundle args = f.getArguments() == null ? new Bundle() : f.getArguments();
if(!args.containsKey("package"))
{
final String pkg = f.getActivity().getIntent().getData().getSchemeSpecificPart();
String pkg;

try
{
pkg = f.getActivity().getIntent().getData().getSchemeSpecificPart();
}
catch(NullPointerException e)
{
log(e);
pkg = null;
}

if(pkg == null || pkg.isEmpty())
{
log("Failed to determine package name; cannot display AppOps");
Expand Down

0 comments on commit 9d89169

Please sign in to comment.