| Index: sky/engine/core/html/imports/HTMLImportLoader.cpp
|
| diff --git a/sky/engine/core/html/imports/HTMLImportLoader.cpp b/sky/engine/core/html/imports/HTMLImportLoader.cpp
|
| index a96b38566d3d8585355e4dbf303b73841ae0542a..22e5b599bc106dc1a677dbc5a99b187963a78ad9 100644
|
| --- a/sky/engine/core/html/imports/HTMLImportLoader.cpp
|
| +++ b/sky/engine/core/html/imports/HTMLImportLoader.cpp
|
| @@ -121,8 +121,10 @@ void HTMLImportLoader::setState(State state)
|
|
|
| m_state = state;
|
|
|
| - if (m_state == StateParsed || m_state == StateError || m_state == StateWritten)
|
| - m_document->cancelParsing();
|
| + if (m_state == StateParsed || m_state == StateError || m_state == StateWritten) {
|
| + if (m_document)
|
| + m_document->cancelParsing();
|
| + }
|
|
|
| // Since DocumentWriter::end() can let setState() reenter, we shouldn't refer to m_state here.
|
| if (state == StateLoaded || state == StateError)
|
|
|