diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 336f5eed71b7..e8662b439943 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -472,6 +472,12 @@ void Entity::characters( const OUString& sChars ) void Entity::endElement() { + if (maContextStack.empty()) + { + // Malformed XML stream !? + return; + } + const SaxContext& aContext = maContextStack.top(); const Reference< XFastContextHandler >& xContext( aContext.mxContext ); if( xContext.is() ) try |