[Telepathy-commits] [telepathy-glib/master] tp_connection_unref_handles: turn an assert into a return_if_fail

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Oct 7 09:11:27 PDT 2008


Passing an out-of-range handle type is library user error, so we should
g_return_if_fail on it.
---
 telepathy-glib/connection-handles.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/telepathy-glib/connection-handles.c b/telepathy-glib/connection-handles.c
index 452275d..dfa7dd2 100644
--- a/telepathy-glib/connection-handles.c
+++ b/telepathy-glib/connection-handles.c
@@ -295,7 +295,7 @@ tp_connection_unref_handles (TpConnection *self,
       return;
     }
 
-  g_assert (handle_type < NUM_TP_HANDLE_TYPES);
+  g_return_if_fail (handle_type < NUM_TP_HANDLE_TYPES);
 
   /* MT: libdbus protects us, if so configured */
   if (!dbus_connection_allocate_data_slot (&connection_handle_refs_slot))
-- 
1.5.6.5




More information about the Telepathy-commits mailing list