From 00b41bfb0fc3f74d83d101045f90e775a6e42ffd Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Mon, 30 Apr 2001 01:31:34 +0000 Subject: [PATCH] Kevin Finn's patch to make sure there is a main window if loading a file fails. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4081 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/FileDialog.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/FileDialog.c b/src/FileDialog.c index c45151bffe..285c979263 100644 --- a/src/FileDialog.c +++ b/src/FileDialog.c @@ -338,6 +338,14 @@ gncPostFileOpen (const char * filename) /* user told us to ignore locks. So ignore them. */ gnc_book_begin (new_book, newfile, TRUE, FALSE); } + else + { + /* Can't use the given file, so just create a new + * database so that the user will get a window that + * they can click "Exit" on. + */ + gncFileNew(); + } } /* if the database doesn't exist, ask the user ... */