Fix possible racey crash after surface destruction
Merge pull request #56 from giucam/crashfix

Fix possible racey crash after surface destruction