tests: camerabin: avoid warning if test is failing

In case the test fails the message won't be returned and it
will lead to an assertion that might be misleading to those
debugging the issue.
This commit is contained in:
Thiago Santos 2014-02-03 23:39:35 -03:00
parent cfda1aafa3
commit f5cf601638

View file

@ -784,7 +784,8 @@ GST_START_TEST (test_multiple_image_captures)
msg = wait_for_element_message (camera, "image-done", GST_CLOCK_TIME_NONE);
fail_unless (msg != NULL);
gst_message_unref (msg);
if (msg)
gst_message_unref (msg);
check_preview_image (camera, image_filename, i);
}