[sysprof] rapl: check for > 0 counters



commit 5fa8c2dd1a318cad47528c655ba133febe3601b9
Author: Christian Hergert <chergert redhat com>
Date:   Thu Aug 1 18:01:39 2019 -0700

    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 f82c53b..b327d28 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]