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();
_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);