From 9157c49b84445afdfdba489496ffdbfa58c05b59 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 10 Dec 2000 05:15:57 +0000 Subject: [PATCH] $T in empty window crashed git-svn-id: http://svn.irssi.org/repos/irssi/trunk@987 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/expandos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/expandos.c b/src/core/expandos.c index 1834323f..757f6b82 100644 --- a/src/core/expandos.c +++ b/src/core/expandos.c @@ -251,7 +251,7 @@ static char *expando_serverversion(SERVER_REC *server, void *item, int *free_ret /* target of current input (channel or QUERY nickname) */ static char *expando_target(SERVER_REC *server, void *item, int *free_ret) { - return ((WI_ITEM_REC *) item)->name; + return item == NULL ? "" : ((WI_ITEM_REC *) item)->name; } /* client release date (numeric version string) */