Kaydet (Commit) 5095ec05 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#37673: Fix a crasher during HTML import on Windows.

üst 8a45e3e6
...@@ -1832,7 +1832,7 @@ public: ...@@ -1832,7 +1832,7 @@ public:
@param pTableMap Pointer to the table map (is allowed to be NULL). */ @param pTableMap Pointer to the table map (is allowed to be NULL). */
explicit ScHTMLTableIterator( const ScHTMLTableMap* pTableMap ); 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.get(); }
inline ScHTMLTable& operator*() { return *maIter->second; } inline ScHTMLTable& operator*() { return *maIter->second; }
inline ScHTMLTableIterator& operator++() { ++maIter; return *this; } inline ScHTMLTableIterator& operator++() { ++maIter; return *this; }
...@@ -1840,9 +1840,11 @@ public: ...@@ -1840,9 +1840,11 @@ public:
private: private:
ScHTMLTableMap::const_iterator maIter; ScHTMLTableMap::const_iterator maIter;
ScHTMLTableMap::const_iterator maEnd; ScHTMLTableMap::const_iterator maEnd;
const ScHTMLTableMap* mpTableMap;
}; };
ScHTMLTableIterator::ScHTMLTableIterator( const ScHTMLTableMap* pTableMap ) ScHTMLTableIterator::ScHTMLTableIterator( const ScHTMLTableMap* pTableMap ) :
mpTableMap(pTableMap)
{ {
if( pTableMap ) if( pTableMap )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment