mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +00:00
LibWeb: Don't crash in BrowsingContextContainer::content_document()
Instead of choking on the VERIFY(document), let's just return null if there's no active document for now. This is incorrect, but sidesteps a frequent crash that happens on content with iframes. I've left a FIXME about removing the hack once it's no longer needed.
This commit is contained in:
parent
d03680a9e7
commit
6ac3bf2982
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,10 @@ const DOM::Document* BrowsingContextContainer::content_document() const
|
|||
// 3. Let document be context's active document.
|
||||
auto const* document = context.active_document();
|
||||
|
||||
//FIXME: This should not be here, as we're expected to have a document at this point.
|
||||
if (!document)
|
||||
return nullptr;
|
||||
|
||||
VERIFY(document);
|
||||
VERIFY(m_document);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue