Fix null pointer dereference segfault.

Reported via PR 21y by github user ethaden.
This is a simpler fix than the one in the PR.
This commit is contained in:
John Ralls 2017-11-28 15:39:41 -08:00
parent a5bf4e00a4
commit 5aa048e01d

View File

@ -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