Fixed crash on quit in entity editor