Fixed crashing bug on Windows when editor is destroyed just after a dialog whose parent window is the editor.