androidmedia: Allow object to be NULL in gst_amc_jni_*unref functions

This commit is contained in:
Matthieu Bouron 2015-04-13 13:10:10 +02:00 committed by Matthew Waters
parent 88cd44fbd8
commit 6ca0be038a

View file

@ -211,12 +211,16 @@ gst_amc_jni_object_ref (JNIEnv * env, jobject object)
void
gst_amc_jni_object_unref (JNIEnv * env, jobject object)
{
g_return_if_fail (object != NULL);
(*env)->DeleteGlobalRef (env, object);
}
void
gst_amc_jni_object_local_unref (JNIEnv * env, jobject object)
{
g_return_if_fail (object != NULL);
(*env)->DeleteLocalRef (env, object);
}