Fix for SVACE defects
[platform/core/api/sound-pool.git] / src / stream.c
index 878573e..eaae813 100644 (file)
@@ -235,6 +235,8 @@ sound_pool_error_e _sound_stream_destroy(sound_stream_t *stream)
        SP_DEBUG_FENTER();
        SP_RETVM_IF(!stream, SOUND_POOL_ERROR_INVALID_PARAMETER,
                        "Can't destroy NULL sound stream");
+       SP_RETVM_IF(!stream->parent_source, SOUND_POOL_ERROR_INVALID_PARAMETER,
+                       "Invalid parent source.");
        SP_RETVM_IF(!stream->parent_source->parent_pool, SOUND_POOL_ERROR_INVALID_PARAMETER,
                        "Empty parent pool pointer.");