1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

$topic shouldn't crash if query doesn't have a valid address set yet.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2639 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-03-23 17:42:48 +00:00 committed by cras
parent 8d2a14b476
commit 1872087642

View File

@ -436,9 +436,14 @@ static char *expando_topic(SERVER_REC *server, void *item, int *free_ret)
if (IS_QUERY(item)) {
QUERY_REC *query = QUERY(item);
if (query->server_tag == NULL)
return "";
*free_ret = TRUE;
return g_strdup_printf("%s (%s)", query->address,
query->server_tag);
return query->address == NULL ?
g_strdup_printf("(%s)", query->server_tag) :
g_strdup_printf("%s (%s)", query->address,
query->server_tag);
}
return "";
}