Commit 6266fd11 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>
(cherry picked from commit de6adcf8)
parent 07b22bcb
......@@ -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)
......@@ -1027,6 +1028,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