[sysprof/wip/chergert/sysprof-3] libsysprof-ui: setup marks reader



commit 4b0534033f5efe9e46eab874c62b42f6b5923ce0
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 13 19:28:30 2019 -0700

    libsysprof-ui: setup marks reader

 src/libsysprof-ui/sysprof-capture-view.c | 10 +++++-----
 src/libsysprof-ui/sysprof-marks-model.c  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-capture-view.c b/src/libsysprof-ui/sysprof-capture-view.c
index b8900d3..6239086 100644
--- a/src/libsysprof-ui/sysprof-capture-view.c
+++ b/src/libsysprof-ui/sysprof-capture-view.c
@@ -374,11 +374,11 @@ sysprof_capture_view_load_scan_cb (GObject      *object,
                                                      g_object_ref (task));
     }
 
-  if (priv->features.has_counters)
-    {
-      state->n_active++;
-      sysprof_visualizer_view_set_reader (priv->visualizer_view, state->reader);
-    }
+  if (priv->features.has_counters || priv->features.has_marks)
+    sysprof_visualizer_view_set_reader (priv->visualizer_view, state->reader);
+
+  if (priv->features.has_marks)
+    sysprof_marks_view_set_reader (priv->marks_view, state->reader);
 
   if (state->n_active == 0)
     g_task_return_boolean (task, TRUE);
diff --git a/src/libsysprof-ui/sysprof-marks-model.c b/src/libsysprof-ui/sysprof-marks-model.c
index 17ee2cf..e76aac0 100644
--- a/src/libsysprof-ui/sysprof-marks-model.c
+++ b/src/libsysprof-ui/sysprof-marks-model.c
@@ -345,7 +345,7 @@ sysprof_marks_model_new_async (SysprofCaptureReader *reader,
   task = g_task_new (NULL, cancellable, callback, user_data);
   g_task_set_source_tag (task, sysprof_marks_model_new_async);
   g_task_set_task_data (task,
-                        sysprof_capture_reader_copy (reader),
+                        sysprof_capture_reader_ref (reader),
                         (GDestroyNotify) sysprof_capture_reader_unref);
   g_task_run_in_thread (task, sysprof_marks_model_new_worker);
 }


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