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
Notes: sideshowbarker 2024-07-17 18:23:22 +09:00

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);