libsysprof: check for null node before setting toplevel

This commit is contained in:
Christian Hergert
2023-08-25 12:42:07 -07:00
parent 3de88108ce
commit 00554090d8

View File

@ -433,14 +433,17 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
list_model_index,
!!(self->flags & SYSPROF_CALLGRAPH_FLAGS_HIDE_SYSTEM_LIBRARIES));
node->is_toplevel = TRUE;
if (node != NULL)
{
node->is_toplevel = TRUE;
if (node && self->augment_func)
self->augment_func (self,
node,
SYSPROF_DOCUMENT_FRAME (traceable),
TRUE,
self->augment_func_data);
if (self->augment_func)
self->augment_func (self,
node,
SYSPROF_DOCUMENT_FRAME (traceable),
TRUE,
self->augment_func_data);
}
if ((self->flags & SYSPROF_CALLGRAPH_FLAGS_CATEGORIZE_FRAMES) != 0)
_sysprof_callgraph_categorize (self, node);