summaryrefslogtreecommitdiff
path: root/gnucash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnucash.cc')
-rw-r--r--gnucash.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/gnucash.cc b/gnucash.cc
index a0dc263c..6367c7c9 100644
--- a/gnucash.cc
+++ b/gnucash.cc
@@ -165,16 +165,12 @@ static void dataHandler(void *userData, const char *s, int len)
}
case COMM_SYM:
- if (curr_comm) {
- curr_comm->symbol = std::string(s, len);
- curr_comm->check_symbol();
- }
- else if (curr_account) {
+ if (curr_comm)
+ curr_comm->set_symbol(std::string(s, len));
+ else if (curr_account)
curr_account_comm = commodity_t::find_commodity(std::string(s, len));
- }
- else if (curr_entry) {
+ else if (curr_entry)
entry_comm = commodity_t::find_commodity(std::string(s, len));
- }
break;
case COMM_NAME: