diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2013-09-19 16:43:18 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2013-09-19 16:43:18 +0100 |
commit | cc4ba028ff8c80110094017ff8159b6b9f5e7440 (patch) | |
tree | 67a0889ebd584db3a842ef00079555f185470e38 | |
parent | c4539db3c11ec82a9a613563903dc8c7fa60f462 (diff) |
check: testclock: don't put code with side-effects in g_assert()
Fixes unit test failures when -DG_DISABLE_ASSERT is used.
https://bugzilla.gnome.org/show_bug.cgi?id=706551
-rw-r--r-- | libs/gst/check/gsttestclock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/gst/check/gsttestclock.c b/libs/gst/check/gsttestclock.c index e103da80e..22f26ae38 100644 --- a/libs/gst/check/gsttestclock.c +++ b/libs/gst/check/gsttestclock.c @@ -785,8 +785,8 @@ gst_test_clock_wait_for_next_pending_id (GstTestClock * test_clock, while (priv->entry_contexts == NULL) g_cond_wait (&priv->entry_added_cond, GST_OBJECT_GET_LOCK (test_clock)); - g_assert (gst_test_clock_peek_next_pending_id_unlocked (test_clock, - pending_id)); + if (!gst_test_clock_peek_next_pending_id_unlocked (test_clock, pending_id)) + g_assert_not_reached (); GST_OBJECT_UNLOCK (test_clock); } |