aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/addons/library.kodi.audioengine/libKODI_audioengine.cpp8
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;