mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibGUI: Make the GML parser a bit more fault-tolerant
It will now fail and whine in the debug log instead of asserting.
This commit is contained in:
@@ -936,7 +936,8 @@ void Widget::set_override_cursor(Gfx::StandardCursor cursor)
|
||||
bool Widget::load_from_gml(const StringView& gml_string)
|
||||
{
|
||||
auto value = parse_gml(gml_string);
|
||||
ASSERT(value.is_object());
|
||||
if (!value.is_object())
|
||||
return false;
|
||||
return load_from_json(value.as_object());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user