Commit de6adcf8 authored by cuongab's avatar cuongab Committed by Felix Paul Kühne

set pointer to nil when release _equalizerInstance object

Missing set this pointer to nill cause app crash when try to enable equalizer or reset equalizer from profile serveral times
Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <felix@feepk.net>
parent a3c35664
......@@ -329,6 +329,7 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self)
if (_equalizerInstance) {
libvlc_media_player_set_equalizer(_playerInstance, NULL);
libvlc_audio_equalizer_release(_equalizerInstance);
_equalizerInstance = nil;
}
if (_viewpoint)
......@@ -1024,6 +1025,7 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self)
if (_equalizerInstance) {
libvlc_media_player_set_equalizer(_playerInstance, NULL);
libvlc_audio_equalizer_release(_equalizerInstance);
_equalizerInstance = nil;
wasactive = YES;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment