mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-11 07:30:54 +00:00
libsysprof-gtk: return NULL unless subtracks are non-empty
These don't really change at runtime, so we can employ this to bridge things to GtkTreeListModel well.
This commit is contained in:
@ -192,6 +192,9 @@ sysprof_track_list_subtracks (SysprofTrack *self)
|
|||||||
|
|
||||||
g_return_val_if_fail (SYSPROF_IS_TRACK (self), NULL);
|
g_return_val_if_fail (SYSPROF_IS_TRACK (self), NULL);
|
||||||
|
|
||||||
|
if (g_list_model_get_n_items (G_LIST_MODEL (priv->subtracks)) == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return g_object_ref (G_LIST_MODEL (priv->subtracks));
|
return g_object_ref (G_LIST_MODEL (priv->subtracks));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user