diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xml.cc | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -463,9 +463,9 @@ node_t * entry_node_t::children() const node_t * entry_node_t::lookup_child(int _name_id) const { switch (_name_id) { - case document_t::CODE: + case document_t::CODE: { if (! entry->code) - return NULL; + break; // jww (2007-04-20): I have to save this and then delete it later terminal_node_t * code_node = @@ -473,8 +473,9 @@ node_t * entry_node_t::lookup_child(int _name_id) const code_node->set_name(document_t::CODE); code_node->set_text(*entry->code); return code_node; + } - case document_t::PAYEE: + case document_t::PAYEE: { // jww (2007-04-20): I have to save this and then delete it later terminal_node_t * payee_node = new terminal_node_t(document, const_cast<entry_node_t *>(this)); @@ -482,6 +483,7 @@ node_t * entry_node_t::lookup_child(int _name_id) const payee_node->set_text(entry->payee); return payee_node; } + } return NULL; } |