summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-06-09 00:13:21 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-06-09 00:19:14 -0400
commit4820648fc4abe7984c3c3c35e4c727c5574e8939 (patch)
tree04663cde79362816bfd992956b76bbd5e427a3f6
parenta9fa8ba99cae6c113270b8559ef57b6a17da33a3 (diff)
fdo#37673: Fix a crasher during HTML import on Windows.
-rw-r--r--sc/source/filter/html/htmlpars.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 5eeed78bf..b75d1f6db 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1832,7 +1832,7 @@ public:
@param pTableMap Pointer to the table map (is allowed to be NULL). */
explicit ScHTMLTableIterator( const ScHTMLTableMap* pTableMap );
- inline bool is() const { return maIter != maEnd; }
+ inline bool is() const { return mpTableMap && maIter != maEnd; }
inline ScHTMLTable* operator->() { return maIter->second.get(); }
inline ScHTMLTable& operator*() { return *maIter->second; }
inline ScHTMLTableIterator& operator++() { ++maIter; return *this; }
@@ -1840,9 +1840,11 @@ public:
private:
ScHTMLTableMap::const_iterator maIter;
ScHTMLTableMap::const_iterator maEnd;
+ const ScHTMLTableMap* mpTableMap;
};
-ScHTMLTableIterator::ScHTMLTableIterator( const ScHTMLTableMap* pTableMap )
+ScHTMLTableIterator::ScHTMLTableIterator( const ScHTMLTableMap* pTableMap ) :
+ mpTableMap(pTableMap)
{
if( pTableMap )
{