mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-25 18:34:14 +00:00
LibWeb: Don't crash when modifying detached progress element attributes
This commit is contained in:
parent
8057542dea
commit
e795c24fdd
Notes:
sideshowbarker
2024-07-17 04:09:56 +09:00
Author: https://github.com/tcl3
Commit: e795c24fdd
Pull-request: https://github.com/SerenityOS/serenity/pull/23624
3 changed files with 13 additions and 1 deletions
|
|
@ -114,7 +114,8 @@ void HTMLProgressElement::create_shadow_tree_if_needed()
|
|||
|
||||
void HTMLProgressElement::update_progress_value_element()
|
||||
{
|
||||
MUST(m_progress_value_element->style_for_bindings()->set_property(CSS::PropertyID::Width, MUST(String::formatted("{}%", position() * 100))));
|
||||
if (m_progress_value_element)
|
||||
MUST(m_progress_value_element->style_for_bindings()->set_property(CSS::PropertyID::Width, MUST(String::formatted("{}%", position() * 100))));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue