gnucash maint: Bug 798533 - Crash when importing quicken @ currency
John Ralls
jralls at code.gnucash.org
Thu Jun 2 17:54:19 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/b218926e (commit)
from https://github.com/Gnucash/gnucash/commit/559d581c (commit)
commit b218926e0b10a06f63a9b3ba1493bea072693e42
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jun 2 14:52:05 2022 -0700
Bug 798533 - Crash when importing quicken @ currency
Ensure that guess-by-symbol returns GNC_COMMODITY_NS_NONCURRENCY
if there's no previously loaded matching security with a namespace.
diff --git a/gnucash/import-export/qif-imp/qif-dialog-utils.scm b/gnucash/import-export/qif-imp/qif-dialog-utils.scm
index 1e8500c27..436e4e9b2 100644
--- a/gnucash/import-export/qif-imp/qif-dialog-utils.scm
+++ b/gnucash/import-export/qif-imp/qif-dialog-utils.scm
@@ -745,12 +745,14 @@
(or (string-ci=? qif-type "stock")
(string-ci=? qif-type "etf")
(string-ci=? qif-type "mutual fund")
- (string-ci=? qif-type "index")
-))))
+ (string-ci=? qif-type "index"))))))
prefs)
- #f))))
- ;; If a preferences match was found, use its namespace.
- (if pref-match (cadr pref-match)))
+ #f)))
+ ;; If a preferences match was found, use its namespace,
+ ;; otherwise the default non-currency namespace.
+ (if pref-match
+ (cadr pref-match)
+ (GNC-COMMODITY-NS-NONCURRENCY)))
;; There's no symbol. Use the built-in default.
(GNC-COMMODITY-NS-NONCURRENCY)))
@@ -815,6 +817,7 @@
(set! qif-symbol security-name))
;; Create the new security and add it to the hash table.
+
(hash-set! security-hash
security-name
(gnc-commodity-new book
Summary of changes:
gnucash/import-export/qif-imp/qif-dialog-utils.scm | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list