[AC21.4] Fix crash when using window manager to delete dialog