diff options
author | Steve Huston <shuston@riverace.com> | 2004-09-21 16:22:46 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2004-09-21 16:22:46 +0000 |
commit | 18a2af362b306b5bd20d4bcfbf3690b17a847281 (patch) | |
tree | 03fc5f0d902c95fc1ef565ba0228f82c4d5d7fa3 /ACEXML | |
parent | 366dfb81db2a7a4d3215eda5fb17d194080babe1 (diff) | |
download | ATCD-18a2af362b306b5bd20d4bcfbf3690b17a847281.tar.gz |
ChangeLogTag:Tue Sep 21 12:16:39 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACEXML')
-rw-r--r-- | ACEXML/parser/parser/Parser.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ACEXML/parser/parser/Parser.cpp b/ACEXML/parser/parser/Parser.cpp index d60a9b35c31..2b7b722e608 100644 --- a/ACEXML/parser/parser/Parser.cpp +++ b/ACEXML/parser/parser/Parser.cpp @@ -3161,7 +3161,7 @@ ACEXML_Parser::parse_encoding_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACEXML_CHECK; } const ACEXML_Char* encoding = this->current_->getInputSource()->getEncoding(); - if (ACE_OS::strcmp (astring, encoding) != 0) + if (encoding != 0 && ACE_OS::strcmp (astring, encoding) != 0) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("Detected Encoding is %s ") ACE_TEXT (": Declared Encoding is %s\n"), @@ -3351,11 +3351,14 @@ ACEXML_Parser::reset (void) if (this->ctx_stack_.pop (this->current_) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("Mismatched push/pop of Context stack"))); - this->current_->getInputSource()->getCharStream()->rewind(); + if (this->current_) + { + this->current_->getInputSource()->getCharStream()->rewind(); - this->current_->setInputSource (0); - delete this->current_; - this->current_ = 0; + this->current_->setInputSource (0); + delete this->current_; + this->current_ = 0; + } ACEXML_Char* temp = 0; while (this->GE_reference_.pop (temp) != -1) |