X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmm_radio_priv_hal.c;h=ac1cd922c51530095f435f1eeb9458ff19e27494;hb=afe8eb8c5e8124f6140813c758d460dd3be8849d;hp=3d1f8d6f8bad4e39de4cf47e83c05ffbc005bfa4;hpb=cc9cd23fde25c4756919d55eb62d4761fd51efcc;p=platform%2Fcore%2Fmultimedia%2Flibmm-radio.git diff --git a/src/mm_radio_priv_hal.c b/src/mm_radio_priv_hal.c index 3d1f8d6..ac1cd92 100644 --- a/src/mm_radio_priv_hal.c +++ b/src/mm_radio_priv_hal.c @@ -196,6 +196,8 @@ int _mmradio_create_radio(mm_radio_t *radio) radio->freq = DEFAULT_FREQ; memset(&radio->region_setting, 0, sizeof(MMRadioRegion_t)); radio->local_volume = 1.0; + radio->vstream = NULL; + radio->stream_info = NULL; /* create msg queue for msg thread */ radio->msg_queue = g_async_queue_new(); @@ -329,8 +331,14 @@ int _mmradio_unrealize(mm_radio_t *radio) _mmradio_stop(radio); #ifdef TIZEN_FEATURE_SOUND_VSTREAM - sound_manager_destroy_virtual_stream(radio->vstream); - sound_manager_destroy_stream_information(radio->stream_info); + if (radio->vstream) { + sound_manager_destroy_virtual_stream(radio->vstream); + radio->vstream = NULL; + } + if (radio->stream_info) { + sound_manager_destroy_stream_information(radio->stream_info); + radio->stream_info = NULL; + } #endif MMRADIO_SET_STATE(radio, MM_RADIO_STATE_NULL);