Fix crash when closing frame while fullscreen
Reported by Joseph Perez