mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Null-check document before doing layout in PageHost::paint()
This commit is contained in:
parent
d413d0557d
commit
03c3b3b7e5
1 changed files with 2 additions and 3 deletions
|
@ -64,9 +64,8 @@ void PageHost::paint(const Gfx::IntRect& content_rect, Gfx::Bitmap& target)
|
|||
Gfx::Painter painter(target);
|
||||
Gfx::IntRect bitmap_rect { {}, content_rect.size() };
|
||||
|
||||
auto* document = page().top_level_browsing_context().active_document();
|
||||
VERIFY(document);
|
||||
document->update_layout();
|
||||
if (auto* document = page().top_level_browsing_context().active_document())
|
||||
document->update_layout();
|
||||
|
||||
auto* layout_root = this->layout_root();
|
||||
if (!layout_root) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue