From 28d40a43ad0e596c017763a420f76d54a50e5cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Fri, 18 May 2007 14:54:08 +0000 Subject: [PATCH] In QIF import, do not cat and merge accounts if imported_account_tree is empty. If an error occurs while importing, imported_account_tree will be set to #f, whereas functions called by gnc:account-tree-catenate-and-merge would expect empty lists. So do not call that function at all. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16093 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/import-export/qif-import/druid-qif-import.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/import-export/qif-import/druid-qif-import.c b/src/import-export/qif-import/druid-qif-import.c index e64092d00a..c64baed9cb 100644 --- a/src/import-export/qif-import/druid-qif-import.c +++ b/src/import-export/qif-import/druid-qif-import.c @@ -1888,9 +1888,10 @@ gnc_ui_qif_import_finish_cb(GnomeDruidPage * gpage, } /* actually add in the new transactions. */ - scm_call_2(cat_and_merge, - scm_c_eval_string("(gnc-get-current-root-account)"), - wind->imported_account_tree); + if (wind->imported_account_tree != SCM_BOOL_F) + scm_call_2(cat_and_merge, + scm_c_eval_string("(gnc-get-current-root-account)"), + wind->imported_account_tree); gnc_resume_gui_refresh();