Index: Source/core/html/imports/LinkImport.cpp |
diff --git a/Source/core/html/imports/LinkImport.cpp b/Source/core/html/imports/LinkImport.cpp |
index 9265f86f7b5183e2c62627f2900f0c6c4f84fdf5..92e01fe1eebce5c1e61b822463a5e284c2ed116b 100644 |
--- a/Source/core/html/imports/LinkImport.cpp |
+++ b/Source/core/html/imports/LinkImport.cpp |
@@ -64,7 +64,9 @@ Document* LinkImport::importedDocument() const |
{ |
if (!m_child || !m_owner || !m_owner->inDocument()) |
return 0; |
- return m_child->importedDocument(); |
+ if (m_child->loader()->hasError()) |
+ return 0; |
+ return m_child->document(); |
} |
void LinkImport::process() |