Skip to content
Permalink
Browse files

Prevent NPE in Animation Controls

  • Loading branch information...
zst123 committed Dec 12, 2013
1 parent 379d9cc commit d7e0018159dea7ec85a494f38598036051a3d9c4
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/com/zst/xposed/xuimod/mods/AnimationControlsMod.java
@@ -213,8 +213,10 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
Animation anim = (Animation) animator.getClass().getDeclaredField("animation")
.get(animator);
XposedHelpers.callMethod(animator, "setAnimation", applyDuration(anim));
param.setResult(true);
if (anim != null) {
XposedHelpers.callMethod(animator, "setAnimation", applyDuration(anim));
param.setResult(true);
}
}
});
}

0 comments on commit d7e0018

Please sign in to comment.
You can’t perform that action at this time.