From 5aa048e01d4ae949505a5ccd5ad15c13bf1edc44 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 28 Nov 2017 15:39:41 -0800 Subject: [PATCH] Fix null pointer dereference segfault. Reported via PR 21y by github user ethaden. This is a simpler fix than the one in the PR. --- gnucash/import-export/aqb/gnc-ab-kvp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/import-export/aqb/gnc-ab-kvp.c b/gnucash/import-export/aqb/gnc-ab-kvp.c index 764afa33c1..80be0425f4 100644 --- a/gnucash/import-export/aqb/gnc-ab-kvp.c +++ b/gnucash/import-export/aqb/gnc-ab-kvp.c @@ -102,7 +102,7 @@ gnc_ab_get_account_trans_retrieval(const Account *a) qof_instance_get (QOF_INSTANCE (a), "ab-trans-retrieval", &t, NULL); - return *t; + return t ? *t : (Timespec){0, 0}; } void