From 82e9b14dc5fde111821577cce546932fdb1e2418 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sun, 29 Sep 2019 21:58:42 +0200 Subject: [PATCH] [aqbanking] Bug 797430: Avoid double init of gui Patch by Mike Pieper. Thanks! Explanation for why this is necessary: The previous (old) behaviour changed in 62f7aa66. Before this commit (or when AQBANKING6 is not set) it calls AB_JobSepaTransfer_new. For AQBANKING6 it calls AB_Transaction_new. AB_Transaction_new is not using gui. Therefore gui->state stays on INIT, while before it made several status changes (=> RUNNING, FINISHED, HIDDEN). On second call to gnc_GWEN_Gui_get it checks the state and finds it still in INIT which seems to be wrong. So the right fix is to either use gui in AB_Transaction_new or to remove first allocation, which is done here. --- gnucash/import-export/aqb/gnc-ab-transfer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnucash/import-export/aqb/gnc-ab-transfer.c b/gnucash/import-export/aqb/gnc-ab-transfer.c index 928d97cef6..153aaab364 100644 --- a/gnucash/import-export/aqb/gnc-ab-transfer.c +++ b/gnucash/import-export/aqb/gnc-ab-transfer.c @@ -142,6 +142,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc, GNC_AB_JOB_STATUS job_status; GncABImExContextImport *ieci = NULL; +#ifndef AQBANKING6 /* Get a GUI object */ gui = gnc_GWEN_Gui_get(parent); if (!gui) @@ -150,6 +151,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc, aborted = TRUE; goto repeat; } +#endif /* Let the user enter the values */ result = gnc_ab_trans_dialog_run_until_ok(td);