From a075334df17ee998cb614c1be817946c69a80df3 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Wed, 4 May 2005 10:12:32 +0000 Subject: BUILD : 1.7.8 (764) BUGS : 363 NOTES : Missing (c->)ci check in do_topic(), causing segfaults... git-svn-id: svn://svn.anope.org/anope/trunk@764 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@525 5417fbe8-f217-4b02-8779-1006273d7864 --- src/channels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/channels.c b/src/channels.c index e881b21ba..88272b29f 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1169,7 +1169,7 @@ void do_topic(const char *source, int ac, char **av) * channel exactly, there's no need to update anything and we can as * well just return silently without updating anything. -GD */ - if ((ac > 3) && *av[3] && (ci = c->ci) && ci->last_topic + if ((ac > 3) && *av[3] && ci && ci->last_topic && (strcmp(av[3], ci->last_topic) == 0) && (strcmp(av[1], ci->last_topic_setter) == 0)) return; @@ -1190,7 +1190,7 @@ void do_topic(const char *source, int ac, char **av) record_topic(av[0]); - if (ci->last_topic) { + if (ci && ci->last_topic) { send_event(EVENT_TOPIC_UPDATED, 2, av[0], ci->last_topic); } else { send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); -- cgit