mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-11 15:40:53 +00:00
libsysprof: better empty check
This commit is contained in:
@ -514,9 +514,13 @@ sysprof_callgraph_profile_get_stash (SysprofCallgraphProfile *self)
|
|||||||
gboolean
|
gboolean
|
||||||
sysprof_callgraph_profile_is_empty (SysprofCallgraphProfile *self)
|
sysprof_callgraph_profile_is_empty (SysprofCallgraphProfile *self)
|
||||||
{
|
{
|
||||||
|
StackNode *root;
|
||||||
|
|
||||||
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_PROFILE (self), FALSE);
|
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_PROFILE (self), FALSE);
|
||||||
|
|
||||||
return self->stash == NULL;
|
return (self->stash == NULL ||
|
||||||
|
!(root = stack_stash_get_root (self->stash)) ||
|
||||||
|
!root->total);
|
||||||
}
|
}
|
||||||
|
|
||||||
GQuark
|
GQuark
|
||||||
|
|||||||
Reference in New Issue
Block a user