1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

Browser: Don't crash when selecting nothing in the Inspector DOM tree

This commit is contained in:
Sam Atkins 2022-03-11 16:40:12 +00:00 committed by Andreas Kling
parent 332799fbcb
commit 38bb9afea8

View file

@ -43,6 +43,9 @@ void InspectorWidget::set_selection(Selection selection)
void InspectorWidget::set_selection(GUI::ModelIndex const index)
{
if (!index.is_valid())
return;
auto* json = static_cast<JsonObject const*>(index.internal_data());
VERIFY(json);