]> git.0d.be Git - empathy.git/commitdiff
Sanity checks for empathy_play_sounds.
authorXavier Claessens <xclaesse@src.gnome.org>
Tue, 6 Jan 2009 16:50:05 +0000 (16:50 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 6 Jan 2009 16:50:05 +0000 (16:50 +0000)
svn path=/trunk/; revision=2102

libempathy-gtk/empathy-ui-utils.c

index 9919b343b83e3ef7e11779136191b1a1bf4bde20..5f36b4b7e16f7c5726d58827e66dc5e31410157d 100644 (file)
@@ -1566,7 +1566,8 @@ empathy_sound_play (GtkWidget *widget,
        EmpathySoundEntry *entry = &(sound_entries[sound_id]);
        gboolean should_play = TRUE;
 
-       g_assert (entry->sound_id == sound_id);
+       g_return_if_fail (entry->sound_id < LAST_EMPATHY_SOUND);
+       g_return_if_fail (entry->sound_id == sound_id);
 
        if (entry->gconf_key != NULL) {
                should_play = empathy_sound_pref_is_enabled (entry->gconf_key);