From a1702b7646c84f53892a7311458a6f306fa80775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 10 Oct 2005 15:30:45 +0000 Subject: gst/gstiterator.c: Add assertions to make sure passed GType is likely to really be a GType (as the compiler won't cat... Original commit message from CVS: * gst/gstiterator.c: (gst_iterator_new): Add assertions to make sure passed GType is likely to really be a GType (as the compiler won't catch it if the size and GType arguments get mixed up, see #318447). --- gst/gstiterator.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gst/gstiterator.c') diff --git a/gst/gstiterator.c b/gst/gstiterator.c index 287ef63b68..dbbadc469e 100644 --- a/gst/gstiterator.c +++ b/gst/gstiterator.c @@ -87,6 +87,8 @@ gst_iterator_new (guint size, GstIterator *result; g_return_val_if_fail (size >= sizeof (GstIterator), NULL); + g_return_val_if_fail (G_TYPE_IS_FUNDAMENTAL (type) == FALSE, NULL); + g_return_val_if_fail (g_type_qname (type) != 0, NULL); g_return_val_if_fail (master_cookie != NULL, NULL); g_return_val_if_fail (next != NULL, NULL); g_return_val_if_fail (resync != NULL, NULL); -- cgit v1.2.1