[sysprof] libsysprof-capture: allow NULL only when n_counters == 0



commit db33d910bbb5641fc358bb660307cd4e965d1dcb
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 6 17:15:10 2019 -0700

    libsysprof-capture: allow NULL only when n_counters == 0

 src/libsysprof-capture/sysprof-capture-writer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libsysprof-capture/sysprof-capture-writer.c b/src/libsysprof-capture/sysprof-capture-writer.c
index 15eba05..351301c 100644
--- a/src/libsysprof-capture/sysprof-capture-writer.c
+++ b/src/libsysprof-capture/sysprof-capture-writer.c
@@ -1220,7 +1220,7 @@ sysprof_capture_writer_set_counters (SysprofCaptureWriter             *self,
   guint i;
 
   g_assert (self != NULL);
-  g_assert (counters_ids != NULL);
+  g_assert (counters_ids != NULL || n_counters == 0);
   g_assert (values != NULL || !n_counters);
 
   if (n_counters == 0)


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