mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
androidmedia: Add more null checks (of env) to JNI utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5138>
This commit is contained in:
parent
c506748c6f
commit
6e5ca29e8f
1 changed files with 4 additions and 0 deletions
|
@ -201,6 +201,7 @@ jobject
|
|||
gst_amc_jni_object_make_global (JNIEnv * env, jobject object)
|
||||
{
|
||||
jobject ret;
|
||||
g_return_val_if_fail (env != NULL, NULL);
|
||||
g_return_val_if_fail (object != NULL, NULL);
|
||||
|
||||
ret = (*env)->NewGlobalRef (env, object);
|
||||
|
@ -216,6 +217,7 @@ jobject
|
|||
gst_amc_jni_object_ref (JNIEnv * env, jobject object)
|
||||
{
|
||||
jobject ret;
|
||||
g_return_val_if_fail (env != NULL, NULL);
|
||||
g_return_val_if_fail (object != NULL, NULL);
|
||||
|
||||
ret = (*env)->NewGlobalRef (env, object);
|
||||
|
@ -228,6 +230,7 @@ gst_amc_jni_object_ref (JNIEnv * env, jobject object)
|
|||
void
|
||||
gst_amc_jni_object_unref (JNIEnv * env, jobject object)
|
||||
{
|
||||
g_return_if_fail (env != NULL);
|
||||
g_return_if_fail (object != NULL);
|
||||
|
||||
(*env)->DeleteGlobalRef (env, object);
|
||||
|
@ -236,6 +239,7 @@ gst_amc_jni_object_unref (JNIEnv * env, jobject object)
|
|||
void
|
||||
gst_amc_jni_object_local_unref (JNIEnv * env, jobject object)
|
||||
{
|
||||
g_return_if_fail (env != NULL);
|
||||
g_return_if_fail (object != NULL);
|
||||
|
||||
(*env)->DeleteLocalRef (env, object);
|
||||
|
|
Loading…
Reference in a new issue