repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 47026e14ce661a041a0151f6c1e0c79e26d08d01:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 47026e14ce661a041a0151f6c1e0c79e26d08d01
Author: Alexander Barton 
Date:   Mon Jul 24 22:54:09 2006 +0000

    Don't assert() when a pre-defined channel has no topic.

diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
index 1b7164f5ac40d914e033aa184eee48c66c6ba971..
index ..922b308337bb310d8ce8f2471df5a04e81cc1597 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 
@@ -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);

-----END OF PAGE-----