From: Jonny Lamb Date: Fri, 30 Jan 2009 17:34:35 +0000 (+0000) Subject: Added argument checking to non-static functions. X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=f42bc2b73cac265958432c3bfd75d91a80ba7626 Added argument checking to non-static functions. Signed-off-by: Jonny Lamb svn path=/trunk/; revision=2334 --- diff --git a/libempathy-gtk/empathy-contact-selector.c b/libempathy-gtk/empathy-contact-selector.c index 1fcc075f..a8f70019 100644 --- a/libempathy-gtk/empathy-contact-selector.c +++ b/libempathy-gtk/empathy-contact-selector.c @@ -56,6 +56,8 @@ empathy_contact_selector_get_selected (EmpathyContactSelector *selector) EmpathyContact *contact = NULL; GtkTreeIter iter; + g_return_val_if_fail (EMPATHY_IS_CONTACT_SELECTOR (selector), NULL); + if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (selector), &iter)) return NULL; @@ -372,5 +374,7 @@ empathy_contact_selector_class_init (EmpathyContactSelectorClass *klass) EmpathyContactSelector * empathy_contact_selector_new (EmpathyContactListStore *store) { + g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), NULL); + return g_object_new (EMPATHY_TYPE_CONTACT_SELECTOR, "store", store, NULL); }