tests/elements/leaks.c: check get_tracer_by_name return value
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 6 Jul 2020 09:55:38 +0000 (11:55 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 10 Jul 2020 15:13:11 +0000 (15:13 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/557>

tests/check/elements/leaks.c

index c457226087b60b6b76222133cc2d1442e86ced6f..767609b86cc3a52860b4f5230e75c89d8ae5eaf7 100644 (file)
@@ -334,6 +334,8 @@ GST_START_TEST (test_activity_start_stop)
   GstMessage *m;
   GstTracer *tracer = get_tracer_by_name ("plain");
 
+  fail_unless (tracer);
+
   g_signal_emit_by_name (tracer, "activity-start-tracking");
 
   pipe = gst_pipeline_new ("pipeline");
@@ -372,6 +374,8 @@ GST_START_TEST (test_activity_log_checkpoint)
   GstMessage *m;
   GstTracer *tracer = get_tracer_by_name ("plain");
 
+  fail_unless (tracer);
+
   g_signal_emit_by_name (tracer, "activity-start-tracking");
 
   pipe = gst_pipeline_new ("pipeline");
@@ -413,6 +417,8 @@ GST_START_TEST (test_activity_get_checkpoint)
   GstMessage *m;
   GstTracer *tracer = get_tracer_by_name ("more");
 
+  fail_unless (tracer);
+
   g_signal_emit_by_name (tracer, "activity-start-tracking");
 
   pipe = gst_pipeline_new ("pipeline");