androidmedia: Add more null checks to JNI utilities

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5130>
This commit is contained in:
Ryan Pavlik 2023-07-19 18:08:32 -05:00 committed by GStreamer Marge Bot
parent 794d723871
commit f3ce30a55a

View file

@ -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) {