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

Commit 2df731cf authored by Greg Kaiser's avatar Greg Kaiser
Browse files

audio: Fix NULL check

We already know jAudioAttributeArray is non-NULL (or else we'd
crash when dereferencing it).  We really want to check if the
contents of jAudioAttributeArray is NULL or not, so we fix this
check.

Test: TreeHugger
Change-Id: I956d99fe608f5e1b9cd0bc3e7c4075e343a6b5ab
parent 66a23d05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ jint JNIAudioAttributeHelper::getJavaArray(
        JNIEnv* env, jobjectArray *jAudioAttributeArray, jint numAudioAttributes)
{
    *jAudioAttributeArray = env->NewObjectArray(numAudioAttributes, gAudioAttributesClass, NULL);
    return jAudioAttributeArray == NULL? (jint)AUDIO_JAVA_ERROR : (jint)AUDIO_JAVA_SUCCESS;
    return *jAudioAttributeArray == NULL? (jint)AUDIO_JAVA_ERROR : (jint)AUDIO_JAVA_SUCCESS;
}

/*