diff options
author | Achim Turan <mail@achim-turan.de> | 2015-09-23 10:03:06 +0200 |
---|---|---|
committer | Achim Turan <mail@achim-turan.de> | 2015-09-23 10:03:06 +0200 |
commit | 1e8837a80e89b64e5fd62e02375ecff0ee0c9735 (patch) | |
tree | 57cdc467ce20ad98383b7accd4a90e7846aa8cf5 /lib | |
parent | 382696a54cac9a07e312040f88a5dff6a9eb3697 (diff) |
[library.kodi.audioengine] [FIX CID 1324647] Fixing Null-checking "cb"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/addons/library.kodi.audioengine/libKODI_audioengine.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/addons/library.kodi.audioengine/libKODI_audioengine.cpp b/lib/addons/library.kodi.audioengine/libKODI_audioengine.cpp index da58f83d5c..f9fbe5e100 100644 --- a/lib/addons/library.kodi.audioengine/libKODI_audioengine.cpp +++ b/lib/addons/library.kodi.audioengine/libKODI_audioengine.cpp @@ -64,8 +64,14 @@ DLLEXPORT void AudioEngine_unregister_me(void *hdl, void* cb) // --------------------------------------------- DLLEXPORT CAddonAEStream* AudioEngine_make_stream(void *hdl, void *cb, AEDataFormat DataFormat, unsigned int SampleRate, unsigned int EncodedSampleRate, enum AEChannel *Channels, unsigned int Options) { + if (!hdl || !cb) + { + fprintf(stderr, "%s-ERROR: AudioEngine_register_me is called with NULL handle !!!\n", LIBRARY_NAME); + return NULL; + } + AEStreamHandle *streamHandle = ((CB_AudioEngineLib*)cb)->MakeStream(DataFormat, SampleRate, EncodedSampleRate, Channels, Options); - if (!hdl || !cb || !streamHandle) + if (!streamHandle) { fprintf(stderr, "%s-ERROR: AudioEngine_make_stream can't MakeStrean failed!\n", LIBRARY_NAME); return NULL; |