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

Commit a857e79e 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

Change-Id: I3f4f1d4809d59394285f7c286a7f3f3014221161
parents 958790f6 01ab4a27
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;