AudioTrack: add missing null pointer check

This commit is contained in:
Julian Winkler
2024-06-12 16:36:06 +02:00
parent 5be3401af5
commit 47e070bec6

View File

@@ -174,7 +174,8 @@ void periodic_update_callback(snd_async_handler_t *pcm_callback)
// TODO error checking
}
(*env)->CallVoidMethod(env, d->listener, handle_cache.audio_track_periodic_listener.onPeriodicNotification, d->this);
if (d->listener)
(*env)->CallVoidMethod(env, d->listener, handle_cache.audio_track_periodic_listener.onPeriodicNotification, d->this);
if((*env)->ExceptionCheck(env))
(*env)->ExceptionDescribe(env);