libsysprof: return null for empty description

Just to decrease chances this causes tooltips to display.
This commit is contained in:
Christian Hergert
2023-07-21 16:55:27 -07:00
parent 5fdef90f4d
commit 017e51cb62

View File

@ -221,6 +221,9 @@ sysprof_document_counter_get_description (SysprofDocumentCounter *self)
{
g_return_val_if_fail (SYSPROF_IS_DOCUMENT_COUNTER (self), NULL);
if (self->description == NULL || self->description[0] == 0)
return NULL;
return self->description;
}