r14781 - gnucash/trunk/src/import-export/hbci - Fix crash when querying data of the already deleted template_list_store of the transfer dialog.
Christian Stimming
cstim at cvs.gnucash.org
Fri Sep 1 17:10:53 EDT 2006
Author: cstim
Date: 2006-09-01 17:10:53 -0400 (Fri, 01 Sep 2006)
New Revision: 14781
Trac: http://svn.gnucash.org/trac/changeset/14781
Modified:
gnucash/trunk/src/import-export/hbci/gnc-hbci-transfer.c
Log:
Fix crash when querying data of the already deleted template_list_store of the transfer dialog.
Modified: gnucash/trunk/src/import-export/hbci/gnc-hbci-transfer.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-hbci-transfer.c 2006-09-01 20:29:16 UTC (rev 14780)
+++ gnucash/trunk/src/import-export/hbci/gnc-hbci-transfer.c 2006-09-01 21:10:53 UTC (rev 14781)
@@ -101,6 +101,13 @@
/* Let the user enter the values. If cancel is pressed, -1 is returned. */
result = gnc_hbci_dialog_run_until_ok(td, h_acc);
+ if ((result != GNC_RESPONSE_NOW) && (result != GNC_RESPONSE_LATER)) {
+ /* If cancel has been pressed, the dialog doesn't exist
+ anymore and we cannot query for the template
+ list. Therefore break immediately. */
+ break;
+ }
+
/* Set the template list in case it got modified. */
if (template_list)
g_list_free(template_list);
@@ -111,10 +118,6 @@
maketrans_save_templates(parent, gnc_acc, template_list,
(result == GNC_RESPONSE_NOW));
- if ((result != GNC_RESPONSE_NOW) && (result != GNC_RESPONSE_LATER)) {
- break;
- }
-
/* Make really sure the dialog is hidden now. */
gnc_hbci_dialog_hide(td);
More information about the gnucash-changes
mailing list