swift - Thread 1: EXC_BAD_ACCESS (code=1, address = 0x38) -


in view controller have action method button. in body of method says

if audioplayer.playing {      audioplayer.stop  } 

when audio player playing, works. when audio player not playing crash error. i'm literally losing sanity me please love of god.

try stop player:

@ibaction func stoptapped(sender: anyobject) {      if let player = audioplayer{         player.stop()     } } 

for more info check this sample project.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -