From 5fa8c2dd1a318cad47528c655ba133febe3601b9 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 1 Aug 2019 18:01:39 -0700 Subject: [PATCH] rapl: check for > 0 counters --- src/libsysprof-ui/sysprof-rapl-aid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsysprof-ui/sysprof-rapl-aid.c b/src/libsysprof-ui/sysprof-rapl-aid.c index f82c53bc..b327d28c 100644 --- a/src/libsysprof-ui/sysprof-rapl-aid.c +++ b/src/libsysprof-ui/sysprof-rapl-aid.c @@ -161,7 +161,7 @@ sysprof_rapl_aid_present_finish (SysprofAid *aid, present = g_task_get_task_data (G_TASK (result)); - if ((counters = g_task_propagate_pointer (G_TASK (result), error))) + if ((counters = g_task_propagate_pointer (G_TASK (result), error)) && counters->len) { g_autoptr(SysprofColorCycle) cycle = sysprof_color_cycle_new (); g_autoptr(GHashTable) cat_to_row = g_hash_table_new (g_str_hash, g_str_equal);