Fixes the bug which caused SIGSEGV after clicking at Menu --> Open after failed trial of opening a file