gnucash maint: Bug 736359 - Date of 0000-00-00 in MySQL backend crashes GnuCash

John Ralls jralls at code.gnucash.org
Mon Oct 6 14:10:44 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/62b88152 (commit)
	from  https://github.com/Gnucash/gnucash/commit/4c77e73f (commit)



commit 62b881523509a0c4ba011c4f7ef3aedc74d74113
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Oct 6 12:19:58 2014 -0700

    Bug 736359 - Date of 0000-00-00 in MySQL backend crashes GnuCash
    
    Unanswered is why the invalid GDate* passed to g_object_set gets turned
    into a NULL at the other end.

diff --git a/src/engine/SchedXaction.c b/src/engine/SchedXaction.c
index ceb30b0..fddc99b 100644
--- a/src/engine/SchedXaction.c
+++ b/src/engine/SchedXaction.c
@@ -659,6 +659,7 @@ xaccSchedXactionGetLastOccurDate(const SchedXaction *sx )
 void
 xaccSchedXactionSetLastOccurDate(SchedXaction *sx, const GDate* new_last_occur)
 {
+    g_return_if_fail (new_last_occur != NULL);
     if (g_date_valid(&sx->last_date)
             && g_date_compare(&sx->last_date, new_last_occur) == 0)
         return;



Summary of changes:
 src/engine/SchedXaction.c | 1 +
 1 file changed, 1 insertion(+)



More information about the gnucash-changes mailing list