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
This commit is contained in:
Andreas Köhler 2007-05-18 14:54:08 +00:00
parent 668b42be04
commit 28d40a43ad

View File

@ -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();