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:
parent
332799fbcb
commit
38bb9afea8
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue