From 89b2a32bf6c5bad835161c6404802dfdc10c17ea Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Thu, 21 Apr 2005 20:42:53 +0000 Subject: [PATCH] Fix forgotten NULL check. 2005-04-21 Christian Stimming * src/import-export/hbci/gnc-hbci-getbalance.c: Fix forgotten NULL check as reported by Martin Preuss . git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10975 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/import-export/hbci/gnc-hbci-getbalance.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b48b018b37..bfac26ead5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-21 Christian Stimming + + * src/import-export/hbci/gnc-hbci-getbalance.c: Fix forgotten NULL + check as reported by Martin Preuss . + 2005-04-14 David Hampton * src/engine/iso-4217-currencies.scm: diff --git a/src/import-export/hbci/gnc-hbci-getbalance.c b/src/import-export/hbci/gnc-hbci-getbalance.c index f4e9e38286..cdfd5501c7 100644 --- a/src/import-export/hbci/gnc-hbci-getbalance.c +++ b/src/import-export/hbci/gnc-hbci-getbalance.c @@ -194,7 +194,7 @@ gnc_hbci_getbalance_finish (GtkWidget *parent, const AB_ACCOUNT_STATUS *response; const AB_BALANCE *noted_grp, *booked_grp; const AB_VALUE *booked_val, *noted_val; - time_t booked_tt; + time_t booked_tt=0; gboolean dialogres; double booked_value, noted_value; gnc_numeric value; @@ -209,8 +209,12 @@ gnc_hbci_getbalance_finish (GtkWidget *parent, booked_grp = AB_AccountStatus_GetBookedBalance(response); if (booked_grp) { + const GWEN_TIME *ti; + + ti=AB_Balance_GetTime(booked_grp); + if (ti) + booked_tt = GWEN_Time_toTime_t (ti); booked_val = AB_Balance_GetValue(booked_grp); - booked_tt = GWEN_Time_toTime_t (AB_Balance_GetTime(booked_grp)); if (booked_val) booked_value = AB_Value_GetValue (booked_val); else {