summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-bar-item.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-10-31 18:19:53 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-10-31 18:19:53 +0100
commit90589b2d717cff5da6314ed38876e2517f038c22 (patch)
treeaa7816ad93707a386ef2195aeb90723050807f40 /src/plugins/irc/irc-bar-item.c
parent911f90e792f22989c5b41970def0302fa806d68b (diff)
downloadweechat-90589b2d717cff5da6314ed38876e2517f038c22.zip
Add extra checks on some pointers
Diffstat (limited to 'src/plugins/irc/irc-bar-item.c')
-rw-r--r--src/plugins/irc/irc-bar-item.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c
index a2c4047e0..77f07b66a 100644
--- a/src/plugins/irc/irc-bar-item.c
+++ b/src/plugins/irc/irc-bar-item.c
@@ -235,9 +235,9 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item,
(part_from_channel) ? IRC_COLOR_BAR_DELIM : "",
(part_from_channel) ? "(" : "",
(server && server->ssl_connected) ? IRC_COLOR_STATUS_NAME_SSL : IRC_COLOR_STATUS_NAME,
- (display_server) ? server->name : "",
- (display_server) ? IRC_COLOR_BAR_DELIM : "",
- (display_server) ? "/" : "",
+ (server && display_server) ? server->name : "",
+ (server && display_server) ? IRC_COLOR_BAR_DELIM : "",
+ (server && display_server) ? "/" : "",
(server && server->ssl_connected) ? IRC_COLOR_STATUS_NAME_SSL : IRC_COLOR_STATUS_NAME,
channel->name,
(part_from_channel) ? IRC_COLOR_BAR_DELIM : "",
@@ -344,9 +344,9 @@ irc_bar_item_channel (void *data, struct t_gui_bar_item *item,
(part_from_channel) ? IRC_COLOR_BAR_DELIM : "",
(part_from_channel) ? "(" : "",
IRC_COLOR_STATUS_NAME,
- (display_server) ? server->name : "",
- (display_server) ? IRC_COLOR_BAR_DELIM : "",
- (display_server) ? "/" : "",
+ (server && display_server) ? server->name : "",
+ (server && display_server) ? IRC_COLOR_BAR_DELIM : "",
+ (server && display_server) ? "/" : "",
IRC_COLOR_STATUS_NAME,
channel->name,
(part_from_channel) ? IRC_COLOR_BAR_DELIM : "",