From 3145eac5771e62084000d9585b6ccddf258b2186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 8 Jan 2011 00:01:01 +0000 Subject: [PATCH] directfb: don't put code with side-effects into g_assert() It will all be turned into a NOOP if -DG_DISABLE_ASSERT is used (as it is for pre-releases and releases). --- ext/directfb/dfb-example.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/directfb/dfb-example.c b/ext/directfb/dfb-example.c index 17dbce3b10..59bbd4a6ff 100644 --- a/ext/directfb/dfb-example.c +++ b/ext/directfb/dfb-example.c @@ -57,7 +57,8 @@ main (int argc, char *argv[]) /* Adding elements to the pipeline */ gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL); - g_assert (gst_element_link (src, sink)); + if (!gst_element_link (src, sink)) + g_error ("Couldn't link videotestsrc and dfbvideosink"); /* Let's play ! */ gst_element_set_state (pipeline, GST_STATE_PLAYING);