AUDIT: r17346 - gnucash/trunk/src/import-export/aqbanking - Do not prepare the match page in the online banking wizard twice.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Jul 19 22:09:07 EDT 2008


Author: andi5
Date: 2008-07-19 22:09:06 -0400 (Sat, 19 Jul 2008)
New Revision: 17346
Trac: http://svn.gnucash.org/trac/changeset/17346

Modified:
   gnucash/trunk/src/import-export/aqbanking/druid-ab-initial.c
Log:
Do not prepare the match page in the online banking wizard twice.

This would online_init() the api too often and lead to a crash.
BP


Modified: gnucash/trunk/src/import-export/aqbanking/druid-ab-initial.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/druid-ab-initial.c	2008-07-19 21:31:21 UTC (rev 17345)
+++ gnucash/trunk/src/import-export/aqbanking/druid-ab-initial.c	2008-07-20 02:09:06 UTC (rev 17346)
@@ -88,6 +88,7 @@
     GtkWidget *druid;
 
     /* account match page */
+    gboolean match_page_prepared;
     GtkTreeView *account_view;
     GtkListStore *account_store;
 
@@ -309,13 +310,18 @@
     Account *root;
     AccCbData data;
 
-
     g_return_if_fail(info && info->api);
 
     /* No way back */
     gnome_druid_set_buttons_sensitive(GNOME_DRUID(info->druid),
                                       FALSE, TRUE, TRUE, TRUE);
 
+    /* Do not run this twice */
+    if (info->match_page_prepared)
+        return;
+    else
+        info->match_page_prepared = TRUE;
+
     /* Load aqbanking accounts */
     AB_Banking_OnlineInit(info->api);
 
@@ -738,6 +744,7 @@
     info->deferred_info = NULL;
     info->gnc_hash = NULL;
 
+    info->match_page_prepared = FALSE;
     info->account_view =
         GTK_TREE_VIEW(glade_xml_get_widget(xml, "account_page_view"));
     info->account_store = gtk_list_store_new(NUM_ACCOUNT_LIST_COLS,



More information about the gnucash-changes mailing list