diff --git a/gnucash/import-export/qif-imp/assistant-qif-import.c b/gnucash/import-export/qif-imp/assistant-qif-import.c index e7cb53f20b..edc448bcbb 100644 --- a/gnucash/import-export/qif-imp/assistant-qif-import.c +++ b/gnucash/import-export/qif-imp/assistant-qif-import.c @@ -1110,7 +1110,8 @@ gnc_ui_qif_import_convert_undo (QIFImportWindow * wind) gnc_set_busy_cursor (NULL, TRUE); /* Undo the conversion. */ - gfec_apply (undo, wind->imported_account_tree, _gfec_error_handler); + if (wind->imported_account_tree != SCM_BOOL_F) + gfec_apply (undo, wind->imported_account_tree, _gfec_error_handler); /* There's no imported account tree any more. */ scm_gc_unprotect_object (wind->imported_account_tree);