libsysprof-analyze: allow getting root augments with NULL

This commit is contained in:
Christian Hergert
2023-06-09 15:57:34 -07:00
parent 12f32e8838
commit 2511e79cae

View File

@ -420,6 +420,9 @@ gpointer
sysprof_callgraph_get_augment (SysprofCallgraph *self,
SysprofCallgraphNode *node)
{
if (node == NULL)
node = &self->root;
return get_augmentation (self, &node->augment);
}
@ -427,6 +430,9 @@ gpointer
sysprof_callgraph_get_summary_augment (SysprofCallgraph *self,
SysprofCallgraphNode *node)
{
if (node == NULL)
node = &self->root;
return get_augmentation (self, &node->summary->augment);
}