Fix to prevent crash during termination of VLC instances.