about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2006-07-24 22:54:09 +0000
committerAlexander Barton <alex@barton.de>2006-07-24 22:54:09 +0000
commit47026e14ce661a041a0151f6c1e0c79e26d08d01 (patch)
tree7ab9e2dbaee0b43128d38e1c600bc595de73b692 /src
parent63626449f805051e26e35961b7eb18d3a833162b (diff)
downloadngircd-47026e14ce661a041a0151f6c1e0c79e26d08d01.tar.gz
ngircd-47026e14ce661a041a0151f6c1e0c79e26d08d01.zip
Don't assert() when a pre-defined channel has no topic.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/channel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
index 1b7164f5..922b3083 100644
--- a/src/ngircd/channel.c
+++ b/src/ngircd/channel.c
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: channel.c,v 1.55 2006/04/23 10:33:37 fw Exp $";
+static char UNUSED id[] = "$Id: channel.c,v 1.56 2006/07/24 22:54:09 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -106,7 +106,8 @@ Channel_InitPredefined( void )
 		if (chan) {
 			Channel_ModeAdd(chan, 'P');
 
-			Channel_SetTopic(chan, NULL,
+			if (array_start(&Conf_Channel[i].topic) != NULL)
+				Channel_SetTopic(chan, NULL,
 					 array_start(&Conf_Channel[i].topic));
 			array_free(&Conf_Channel[i].topic);