[Gnucash-changes] Fix forgotten NULL check.

Christian Stimming cstim at cvs.gnucash.org
Thu Apr 21 16:42:56 EDT 2005


Log Message:
-----------
Fix forgotten NULL check.

2005-04-21  Christian Stimming  <stimming at tuhh.de>

	* src/import-export/hbci/gnc-hbci-getbalance.c: Fix forgotten NULL
	check as reported by Martin Preuss <aquamaniac at gmx.de>.

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/import-export/hbci:
        gnc-hbci-getbalance.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1903
retrieving revision 1.1904
diff -LChangeLog -LChangeLog -u -r1.1903 -r1.1904
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,8 @@
+2005-04-21  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/gnc-hbci-getbalance.c: Fix forgotten NULL
+	check as reported by Martin Preuss <aquamaniac at gmx.de>.
+
 2005-04-14  David Hampton  <hampton at employees.org>
 
 	* src/engine/iso-4217-currencies.scm: 
Index: gnc-hbci-getbalance.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-getbalance.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -Lsrc/import-export/hbci/gnc-hbci-getbalance.c -Lsrc/import-export/hbci/gnc-hbci-getbalance.c -u -r1.33 -r1.34
--- src/import-export/hbci/gnc-hbci-getbalance.c
+++ src/import-export/hbci/gnc-hbci-getbalance.c
@@ -194,7 +194,7 @@
   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 @@
   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 {


More information about the gnucash-changes mailing list