From f3ce30a55a0b9c10a181f21c9e02b44b5a3e0514 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 19 Jul 2023 18:08:32 -0500 Subject: [PATCH] androidmedia: Add more null checks to JNI utilities Part-of: --- subprojects/gst-plugins-bad/sys/androidmedia/gstjniutils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/androidmedia/gstjniutils.c b/subprojects/gst-plugins-bad/sys/androidmedia/gstjniutils.c index 219268cfe8..e794c47512 100644 --- a/subprojects/gst-plugins-bad/sys/androidmedia/gstjniutils.c +++ b/subprojects/gst-plugins-bad/sys/androidmedia/gstjniutils.c @@ -201,6 +201,7 @@ jobject gst_amc_jni_object_make_global (JNIEnv * env, jobject object) { jobject ret; + g_return_val_if_fail (object != NULL, NULL); ret = (*env)->NewGlobalRef (env, object); if (!ret) { @@ -215,6 +216,7 @@ jobject gst_amc_jni_object_ref (JNIEnv * env, jobject object) { jobject ret; + g_return_val_if_fail (object != NULL, NULL); ret = (*env)->NewGlobalRef (env, object); if (!ret) {