summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-04-18 20:40:16 -0400
committerTingPing <tingping@tingping.se>2014-04-18 20:40:33 -0400
commit5f297950a2ec399bfa9bc2163133e8fd948f421c (patch)
tree59ce3114b76b47ce1d905f9a61abba4fc4aabefc /src/fe-gtk
parentccf49aa48da2107a5e23bdcaf9135a1538c78833 (diff)
Fix issues removing autojoin channels
- Makes remove case insensitive
- Fixes crashing when channel not found
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/servlistgui.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c
index 389607d0..c72c5af3 100644
--- a/src/fe-gtk/servlistgui.c
+++ b/src/fe-gtk/servlistgui.c
@@ -1088,8 +1088,11 @@ servlist_autojoinedit (ircnet *net, char *channel, gboolean add)
 	else
 	{
 		fav = servlist_favchan_find (net, channel, NULL);
-		servlist_favchan_remove (net, fav);
-		servlist_save ();
+		if (fav)
+		{
+			servlist_favchan_remove (net, fav);
+			servlist_save ();
+		}
 	}
 }