Jebbs / DSFML

DSFML is a D binding of SFML
Other
95 stars 23 forks source link

Fix segfault in Music destructor #280

Closed Jebbs closed 6 years ago

Jebbs commented 6 years ago

This fixes a segmentation fault that was happening in the Music class' destructor. Basically, when stop() is called in the destructor, the mutex used by the SoundStream has already been finalized and bad things happen when we try to lock the mutex.

I don't think we need to call stop() in the destructor because it only resets a couple of variables on top of what the SoundStream destructor already does.