Commit f009483a authored by swift_gan's avatar swift_gan

fix NPE

parent 5973f803
...@@ -110,13 +110,12 @@ bool doHookWithReplacement(JNIEnv* env, ...@@ -110,13 +110,12 @@ bool doHookWithReplacement(JNIEnv* env,
art::mirror::ArtMethod *hookMethod, art::mirror::ArtMethod *hookMethod,
art::mirror::ArtMethod *backupMethod) { art::mirror::ArtMethod *backupMethod) {
if (!backupMethod->isCompiled()) {
backupMethod->compile(env);
}
hookMethod->compile(env); hookMethod->compile(env);
if (backupMethod != nullptr) { if (backupMethod != nullptr) {
if (!backupMethod->isCompiled()) {
backupMethod->compile(env);
}
originMethod->backup(backupMethod); originMethod->backup(backupMethod);
if (SDK_INT >= ANDROID_N) { if (SDK_INT >= ANDROID_N) {
backupMethod->disableCompilable(); backupMethod->disableCompilable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment