mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:05:07 +00:00
LibWeb: Null-check layout node before dereferencing in HTMLVideoElement
DOM elements don't always have a corresponding layout node. This fixes a crash soon after loading the Steam store.
This commit is contained in:
parent
fb722e69f3
commit
5bb6e2c80c
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ void HTMLVideoElement::set_video_track(JS::GCPtr<HTML::VideoTrack> video_track)
|
|||
void HTMLVideoElement::set_current_frame(Badge<VideoTrack>, RefPtr<Gfx::Bitmap> frame, double position)
|
||||
{
|
||||
m_current_frame = { move(frame), position };
|
||||
layout_node()->set_needs_display();
|
||||
if (layout_node())
|
||||
layout_node()->set_needs_display();
|
||||
}
|
||||
|
||||
void HTMLVideoElement::on_playing()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue