Added SILC Thread Queue API
[crypto.git] / apps / irssi / src / fe-text / statusbar.c
index ef62037914b4f2726822f3dc5c358c05b1278206..5eba9557f9ace85104067cf6b8687e3a930794ef 100644 (file)
@@ -684,8 +684,8 @@ void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only,
                                    int escape_vars)
 {
        SERVER_REC *server;
-       WI_ITEM_REC *wiitem;
-        char *tmpstr, *tmpstr2;
+       WI_ITEM_REC *wiitem; 
+       char *tmpstr, *tmpstr2;
        int len;
 
        if (str == NULL)
@@ -699,8 +699,9 @@ void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only,
                server = NULL;
                 wiitem = NULL;
        } else {
-               server = active_win->active_server;
-                wiitem = active_win->active;
+               server = active_win->active_server != NULL ?
+                       active_win->active_server : active_win->connect_server;
+               wiitem = active_win->active;
        }
 
        /* expand templates */