From fd41024d29f093afe2fe1f0292c7ec5965ba5801 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 8 Sep 2010 21:01:37 +0100 Subject: [PATCH] paint_volume: assert non-NULL pv in _volume_copy Instead of carefully checking if the user passes NULL to clutter_paint_volume_copy we now simply use g_return_val_if_fail. --- clutter/clutter-paint-volume.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clutter/clutter-paint-volume.c b/clutter/clutter-paint-volume.c index a184da7b5..1fa285598 100644 --- a/clutter/clutter-paint-volume.c +++ b/clutter/clutter-paint-volume.c @@ -139,9 +139,7 @@ clutter_paint_volume_copy (const ClutterPaintVolume *pv) { ClutterPaintVolume *copy; - /* XXX: can we just g_return_val_if_fail instead‽ */ - if (G_UNLIKELY (pv == NULL)) - return NULL; + g_return_val_if_fail (pv != NULL, NULL); copy = g_slice_dup (ClutterPaintVolume, pv); if (copy->actor)