Qt: Fix crash when clicking on expanded entry in Expert Info Dialog

The root node has a NULL associated field_info struct, so check
for that.

Fix #18662
This commit is contained in:
John Thacker 2022-11-21 20:35:13 -05:00
parent 8ab801557b
commit 646df7fe14
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ struct find_hfid_ {
bool ProtoTreeModel::foreachFindHfid(ProtoNode *node, gpointer find_hfid_ptr)
{
struct find_hfid_ *find_hfid = (struct find_hfid_ *) find_hfid_ptr;
if (PNODE_FINFO(node->protoNode())->hfinfo->id == find_hfid->hfid) {
if (PNODE_FINFO(node->protoNode()) && PNODE_FINFO(node->protoNode())->hfinfo->id == find_hfid->hfid) {
find_hfid->node = node;
return true;
}