mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:35:09 +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:
parent
64ba41ea13
commit
6e0976d858
2 changed files with 46 additions and 18 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue