# HG changeset patch # User Mikael Berthe # Date 1145039915 -7200 # Node ID 3521e34f722a46b9ca0d08c4108d6ff0497bd239 # Parent 43c22f43964efb75eb5e04013f0bb5f6fe91e556 Fix a segfault when not connected to a server Bug reported by Mario Iseli. diff -r 43c22f43964e -r 3521e34f722a mcabber/src/screen.c --- a/mcabber/src/screen.c Fri Apr 14 19:17:09 2006 +0200 +++ b/mcabber/src/screen.c Fri Apr 14 20:38:35 2006 +0200 @@ -851,18 +851,26 @@ // at least to refresh the pending message flag. scr_UpdateMainStatus(FALSE); + // Clear the line + werase(chatstatusWnd); + + if (chatmode) + wprintw(chatstatusWnd, "~"); + + if (!current_buddy) { + if (forceupdate) { + update_panels(); + doupdate(); + } + return; + } + fullname = buddy_getname(BUDDATA(current_buddy)); btype = buddy_gettype(BUDDATA(current_buddy)); isgrp = btype & ROSTER_TYPE_GROUP; ismuc = btype & ROSTER_TYPE_ROOM; - // Clear the line - werase(chatstatusWnd); - - if (chatmode) - wprintw(chatstatusWnd, "~"); - if (isgrp) { buf_locale = from_utf8(fullname); mvwprintw(chatstatusWnd, 0, 5, "Group: %s", buf_locale);