# SDL: Android: OpenSLES, explicitly initialise the global variable 'bqPlayerPlay',

**URL:** <https://discourse.libsdl.org/t/sdl-android-opensles-explicitly-initialise-the-global-variable-bqplayerplay/31276>\
**Category:** SDL Commits\
**Created:** [April 15, 2021, 7:20pm UTC](https://discourse.libsdl.org/t/sdl-android-opensles-explicitly-initialise-the-global-variable-bqplayerplay/31276 "2021-04-15T19:20:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [April 15, 2021, 7:20pm UTC](https://discourse.libsdl.org/t/sdl-android-opensles-explicitly-initialise-the-global-variable-bqplayerplay/31276/1 "2021-04-15T19:20:03Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/4118fe62fe278429a514c43d02286f8e0c7741df>

```diff
From 4118fe62fe278429a514c43d02286f8e0c7741df Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Thu, 15 Apr 2021 20:52:43 +0200
Subject: [PATCH] Android: OpenSLES, explicitly initialise the global variable
 'bqPlayerPlay', it may be read even if OpenSLES back-end hasn't been
 intialized

---
 src/audio/openslES/SDL_openslES.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio/openslES/SDL_openslES.c b/src/audio/openslES/SDL_openslES.c
index 606d36ee4..d271724db 100644
--- a/src/audio/openslES/SDL_openslES.c
+++ b/src/audio/openslES/SDL_openslES.c
@@ -83,7 +83,7 @@ static SLObjectItf outputMixObject;
 
 /* buffer queue player interfaces */
 static SLObjectItf bqPlayerObject;
-static SLPlayItf bqPlayerPlay;
+static SLPlayItf bqPlayerPlay = NULL;
 static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue;
 #if 0
 static SLVolumeItf bqPlayerVolume;

```
