summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2004-01-07 04:26:16 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2004-01-07 04:26:16 +0000
commit1cbd975b2d55a4e7796785494a37fda22914836b (patch)
treea594726d8b97a65b46de1e61db88b6b5ca6d34d0 /src/core
parent9da6e85aedf3111ef9ce4d7d4ad17913ef7a583e (diff)
downloadirssi-1cbd975b2d55a4e7796785494a37fda22914836b.zip
/msg , crashfix by c0ffee
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3196 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r--src/core/chat-commands.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c
index ad9313ed..2749c5d5 100644
--- a/src/core/chat-commands.c
+++ b/src/core/chat-commands.c
@@ -364,10 +364,17 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
if (strcmp(target, ",") == 0 || strcmp(target, ".") == 0) {
target = parse_special(&target, server, item,
NULL, &free_ret, NULL, 0);
- if (target != NULL && *target == '\0')
+ if (target != NULL && *target == '\0') {
+ if (free_ret)
+ g_free(target);
target = NULL;
+ free_ret = FALSE;
+ }
}
+ if (target == NULL)
+ target = origtarget;
+
if (strcmp(target, "*") == 0) {
/* send to active channel/query */
if (item == NULL)