diff src/blist.c @ 12458:8626cc8d0df9

[gaim-migrate @ 14767] Don't allow adding a group with an empty name. We should probably not allow this in the GUI, too. This is better than nothing, though. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 12 Dec 2005 05:58:56 +0000
parents bd42f4d5854c
children 18b16e801e6f
line wrap: on
line diff
--- a/src/blist.c	Mon Dec 12 05:48:08 2005 +0000
+++ b/src/blist.c	Mon Dec 12 05:58:56 2005 +0000
@@ -1457,8 +1457,12 @@
 GaimGroup *gaim_group_new(const char *name)
 {
 	GaimBlistUiOps *ops = gaim_blist_get_ui_ops();
-	GaimGroup *group = gaim_find_group(name);
-
+	GaimGroup *group;
+
+	g_return_val_if_fail(name  != NULL, NULL);
+	g_return_val_if_fail(*name != '\0', NULL);
+
+	group = gaim_find_group(name);
 	if (group != NULL)
 		return group;