mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
LibWeb: Make BrowsingContext::reset_cursor_blink_cycle() more robust
If the browsing context text cursor has become invalid for whatever reason, don't try to repaint its associated node.
This commit is contained in:
parent
5b8290dfa3
commit
8aa24c45dd
|
@ -54,7 +54,8 @@ void BrowsingContext::reset_cursor_blink_cycle()
|
|||
{
|
||||
m_cursor_blink_state = true;
|
||||
m_cursor_blink_timer->restart();
|
||||
m_cursor_position.node()->layout_node()->set_needs_display();
|
||||
if (m_cursor_position.is_valid() && m_cursor_position.node()->layout_node())
|
||||
m_cursor_position.node()->layout_node()->set_needs_display();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#top-level-browsing-context
|
||||
|
|
Loading…
Reference in a new issue