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

Commit d568f9b8 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: 8f1c0be3

Change-Id: I9e9fefdd10adcb775644031b06c0d5868f3ab2fb
parents d7c49b54 8f1c0be3
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;