mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Fix null optional dereference in Node::name_or_description()
Regression/typo from aeee98b
, this lead to a crash when opening the DOM
inspector.
This commit is contained in:
parent
7467307377
commit
11f7db8f34
Notes:
sideshowbarker
2024-07-17 07:35:03 +09:00
Author: https://github.com/MacDue
Commit: 11f7db8f34
Pull-request: https://github.com/SerenityOS/serenity/pull/21449
1 changed files with 1 additions and 1 deletions
|
@ -1880,7 +1880,7 @@ ErrorOr<String> Node::name_or_description(NameOrDescription target, Document con
|
|||
if (is<HTML::HTMLElement>(this)) {
|
||||
auto const* element = static_cast<HTML::HTMLElement const*>(this);
|
||||
auto tooltip = element->title();
|
||||
if (!tooltip.has_value() && !tooltip->is_empty())
|
||||
if (tooltip.has_value() && !tooltip->is_empty())
|
||||
return tooltip.release_value();
|
||||
}
|
||||
// Append the result of each step above, with a space, to the total accumulated text.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue