From 947c1bb1c675b5e027ffade67bb85317836c331b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 30 Apr 2002 22:39:13 +0000 Subject: /notice *, /ctcp * and /nctcp * crashed if there wasn't active window item. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2743 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-irc-commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 264ec32f..dafa3dde 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -108,7 +108,7 @@ static void cmd_notice(const char *data, IRC_SERVER_REC *server, &target, &msg)) return; if (strcmp(target, "*") == 0) - target = item == NULL ? NULL : item->name; + target = item == NULL ? "" : item->name; if (*target == '\0' || *msg == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); @@ -130,7 +130,7 @@ static void cmd_ctcp(const char *data, IRC_SERVER_REC *server, &target, &ctcpcmd, &ctcpdata)) return; if (strcmp(target, "*") == 0) - target = item == NULL ? NULL : item->name; + target = item == NULL ? "" : item->name; if (*target == '\0' || *ctcpcmd == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); @@ -161,7 +161,7 @@ static void cmd_nctcp(const char *data, IRC_SERVER_REC *server, &target, &text)) return; if (strcmp(target, "*") == 0) - target = item == NULL ? NULL : item->name; + target = item == NULL ? "" : item->name; if (*target == '\0' || *text == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); -- cgit v1.2.3