aboutsummaryrefslogtreecommitdiffstats
path: root/set.c
diff options
context:
space:
mode:
Diffstat (limited to 'set.c')
-rw-r--r--set.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/set.c b/set.c
index 4207df81..60912e10 100644
--- a/set.c
+++ b/set.c
@@ -149,7 +149,11 @@ void set_del( irc_t *irc, char *key )
}
if( s )
{
- t->next = s->next;
+ if( t )
+ t->next = s->next;
+ else
+ irc->set = s->next;
+
g_free( s->key );
if( s->value ) g_free( s->value );
if( s->def ) g_free( s->def );