Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f75dded authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AChoreographer: Avoid potential NULL dereference" into rvc-dev am: 01ab4a27 am: 5b2fed5f

Change-Id: Ie83b298bae5fa56232c6cca1c8187e15086b9e4e
parents b2011aab 5b2fed5f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -250,12 +250,12 @@ void Choreographer::registerRefreshRateCallback(AChoreographer_refreshRateCallba
    }
    if (needsRegistration) {
        JNIEnv* env = getJniEnv();
        jobject dmg = env->CallStaticObjectMethod(gJni.displayManagerGlobal.clazz,
                                                  gJni.displayManagerGlobal.getInstance);
        if (env == nullptr) {
            ALOGW("JNI environment is unavailable, skipping registeration");
            ALOGW("JNI environment is unavailable, skipping registration");
            return;
        }
        jobject dmg = env->CallStaticObjectMethod(gJni.displayManagerGlobal.clazz,
                                                  gJni.displayManagerGlobal.getInstance);
        if (dmg == nullptr) {
            ALOGW("DMS is not initialized yet: skipping registration");
            return;