Merge with 3.2
Issue #10365: File open dialog now works instead of crashing
even when parent window is closed. Patch by Roger Serwy.