mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
androidmedia: Add more null checks to JNI utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5130>
This commit is contained in:
parent
794d723871
commit
f3ce30a55a
1 changed files with 2 additions and 0 deletions
|
@ -201,6 +201,7 @@ jobject
|
||||||
gst_amc_jni_object_make_global (JNIEnv * env, jobject object)
|
gst_amc_jni_object_make_global (JNIEnv * env, jobject object)
|
||||||
{
|
{
|
||||||
jobject ret;
|
jobject ret;
|
||||||
|
g_return_val_if_fail (object != NULL, NULL);
|
||||||
|
|
||||||
ret = (*env)->NewGlobalRef (env, object);
|
ret = (*env)->NewGlobalRef (env, object);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
@ -215,6 +216,7 @@ jobject
|
||||||
gst_amc_jni_object_ref (JNIEnv * env, jobject object)
|
gst_amc_jni_object_ref (JNIEnv * env, jobject object)
|
||||||
{
|
{
|
||||||
jobject ret;
|
jobject ret;
|
||||||
|
g_return_val_if_fail (object != NULL, NULL);
|
||||||
|
|
||||||
ret = (*env)->NewGlobalRef (env, object);
|
ret = (*env)->NewGlobalRef (env, object);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
|
Loading…
Reference in a new issue