reverted a change to have an assert instead of a g_return_val_if_fail()

Mon Oct  2 15:50:16 2006  Tim Janik  <timj@gtk.org>

        * gvalue.c (g_value_peek_pointer): reverted a change to have an
        assert instead of a g_return_val_if_fail() here. libraries (and
        programs) should only ever g_assert or g_error if there is no way
        to carry on with the current program state. that's clearly not
        the case here.

        * ChangeLog: added missing changelog entry for 2003-12-30.
This commit is contained in:
Tim Janik
2006-10-02 13:52:13 +00:00
committed by Tim Janik
parent 81115d312d
commit 2d75227eb1
2 changed files with 18 additions and 1 deletions

View File

@@ -178,7 +178,7 @@ g_value_peek_pointer (const GValue *value)
value_table = g_type_value_table_peek (G_VALUE_TYPE (value));
if (!value_table->value_peek_pointer)
{
g_assert (g_value_fits_pointer (value) == TRUE);
g_return_val_if_fail (g_value_fits_pointer (value) == TRUE, NULL);
return NULL;
}