summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-18 08:38:14 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-09-18 15:34:26 +0200
commitd7350545ac6c54f07d59c66ccd3b889180e65f4d (patch)
treec0a5268348a5582c0e86be5f21b66f5a2d951baf /sax
parent1ef778072763a539809c74804ef074c556efe501 (diff)
Better to throw than crash, if token handler is not set.
Change-Id: If6b2d39b487b5f673d5b6b2945a6e7d08777594e
Diffstat (limited to 'sax')
-rw-r--r--sax/source/fastparser/fastparser.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 37b513356a99..fcbb58d70cc8 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -781,6 +781,9 @@ void FastSaxParserImpl::parseStream(const InputSource& maStructSource)
Entity entity( maData );
entity.maStructSource = maStructSource;
+ if( !entity.mxTokenHandler.is() )
+ throw SAXException("No token handler, use setTokenHandler()", Reference< XInterface >(), Any() );
+
if( !entity.maStructSource.aInputStream.is() )
throw SAXException("No input source", Reference< XInterface >(), Any() );