aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2022-11-21 20:35:13 -0500
committerJohn Thacker <johnthacker@gmail.com>2022-11-21 20:36:41 -0500
commit646df7fe14834e9dc7b8eb562471ac98d6f59170 (patch)
tree1158d5fd18ff69f8df8484592a1ac703e64b7ce3 /ui
parent8ab801557b123a50a6be1e42f4260a6debb4b6fe (diff)
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
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/models/proto_tree_model.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/models/proto_tree_model.cpp b/ui/qt/models/proto_tree_model.cpp
index 8aeca7642b..3ededffd7f 100644
--- a/ui/qt/models/proto_tree_model.cpp
+++ b/ui/qt/models/proto_tree_model.cpp
@@ -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;
}