diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-30 14:01:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-30 14:02:50 -0400 |
commit | 3f177756dbdb67d901453000c3f11694770d2761 (patch) | |
tree | 737b5e454419c68be229876ae4c13a1a5d370dbc /sax | |
parent | 3828e942ebe4ab26cb5f074504f23587f43c1dd6 (diff) |
Check for empty() before calling top().
Else it might crash sometimes.
Change-Id: I6a24fff83c3d36346debae5c0f2b8c0646a15c01
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index e8662b439943..82378b1b0275 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -660,6 +660,9 @@ sal_Int32 FastSaxParserImpl::GetTokenWithPrefix( const sal_Char*pPrefix, int nPr sal_Int32 nNamespaceToken = FastToken::DONTKNOW; Entity& rEntity = getEntity(); + if (rEntity.maNamespaceCount.empty()) + return nNamespaceToken; + sal_uInt32 nNamespace = rEntity.maNamespaceCount.top(); while( nNamespace-- ) { |