summary refs log tree commit diff stats
path: root/src/fe-gtk/servlistgui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk/servlistgui.c')
-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 ();
+		}
 	}
 }