mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -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:
parent
8d2a14b476
commit
1872087642
@ -436,9 +436,14 @@ static char *expando_topic(SERVER_REC *server, void *item, int *free_ret)
|
|||||||
if (IS_QUERY(item)) {
|
if (IS_QUERY(item)) {
|
||||||
QUERY_REC *query = QUERY(item);
|
QUERY_REC *query = QUERY(item);
|
||||||
|
|
||||||
|
if (query->server_tag == NULL)
|
||||||
|
return "";
|
||||||
|
|
||||||
*free_ret = TRUE;
|
*free_ret = TRUE;
|
||||||
return g_strdup_printf("%s (%s)", query->address,
|
return query->address == NULL ?
|
||||||
query->server_tag);
|
g_strdup_printf("(%s)", query->server_tag) :
|
||||||
|
g_strdup_printf("%s (%s)", query->address,
|
||||||
|
query->server_tag);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user