directfb: don't put code with side-effects into g_assert()
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 8 Jan 2011 00:01:01 +0000 (00:01 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 8 Jan 2011 00:01:01 +0000 (00:01 +0000)
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

index 17dbce3b106a05a46fedf11f58c08b204b1c800c..59bbd4a6ffa08e33efa6ce7d17bd19c91f011eb4 100644 (file)
@@ -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);