Mercurial > pidgin
diff src/dbus-server.c @ 11291:57fccea36e36
[gaim-migrate @ 13491]
Gaim should pretty much never call g_assert. If any of these changes
are in your code, you should try to take a look at the change and
make sure Gaim won't crash after the function g_return_if_fails.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 18 Aug 2005 03:14:29 +0000 |
parents | 421a8523ad04 |
children | c9312177821a |
line wrap: on
line diff
--- a/src/dbus-server.c Thu Aug 18 01:35:14 2005 +0000 +++ b/src/dbus-server.c Thu Aug 18 03:14:29 2005 +0000 @@ -77,8 +77,8 @@ { static gint last_id = 0; - g_assert(map_node_id); - g_assert(g_hash_table_lookup(map_node_id, node) == NULL); + g_return_if_fail(map_node_id); + g_return_if_fail(g_hash_table_lookup(map_node_id, node) == NULL); last_id++; g_hash_table_insert(map_node_id, node, GINT_TO_POINTER(last_id)); @@ -633,7 +633,7 @@ gpointer ptr = NULL; if (gaim_value_is_outgoing(gaim_values[i])) { ptr = my_arg(gpointer); - g_assert(ptr); + g_return_if_fail(ptr); } switch(gaim_values[i]->type) { @@ -661,7 +661,7 @@ dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &id); break; default: /* no conversion implemented */ - g_assert_not_reached(); + g_return_if_reached(); } } }