Stop some errors when cancelling the QIF import

The imported_account_tree variable is only set when the 'start import'
button is pressed on assistant page 'QIF import' so only process the
undo from there.
pull/507/head
Robert Fewell 7 years ago
parent 35b3d6d187
commit ea0982eb33

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

Loading…
Cancel
Save