Null-value protection for GUID and account values.

This commit is contained in:
John Ralls 2021-08-17 15:34:45 -07:00
parent 53fac914c0
commit c06924622c

View File

@ -79,10 +79,12 @@
(list)))
(define (gnc:register-guid type guid)
(gnc-build-url URL-TYPE-REGISTER (string-append type guid) ""))
(and guid (gnc-build-url URL-TYPE-REGISTER (string-append type guid) "")))
(define (gnc:account-anchor-text acct)
(gnc:register-guid "acct-guid=" (gncAccountGetGUID acct)))
(if acct
(gnc:register-guid "acct-guid=" (gncAccountGetGUID acct))
(format #t "No Account!")))
(define (gnc:split-anchor-text split)
(gnc:register-guid "split-guid=" (gncSplitGetGUID split)))