Reset music pointer to NULL after freeing and prevent double-free

Fixes #1146
Merge pull request #1147 from dorkster/fixes

Reset music pointer to NULL after freeing and prevent double-free
Merge remote-tracking branch 'upstream/master'