comparison mcabber/src/screen.c @ 806:3521e34f722a

Fix a segfault when not connected to a server Bug reported by Mario Iseli.
author Mikael Berthe <mikael@lilotux.net>
date Fri, 14 Apr 2006 20:38:35 +0200
parents 5eb701c1bc1f
children f6cda389db48
comparison
equal deleted inserted replaced
805:43c22f43964e 806:3521e34f722a
849 849
850 // Usually we need to update the bottom status line too, 850 // Usually we need to update the bottom status line too,
851 // at least to refresh the pending message flag. 851 // at least to refresh the pending message flag.
852 scr_UpdateMainStatus(FALSE); 852 scr_UpdateMainStatus(FALSE);
853 853
854 // Clear the line
855 werase(chatstatusWnd);
856
857 if (chatmode)
858 wprintw(chatstatusWnd, "~");
859
860 if (!current_buddy) {
861 if (forceupdate) {
862 update_panels();
863 doupdate();
864 }
865 return;
866 }
867
854 fullname = buddy_getname(BUDDATA(current_buddy)); 868 fullname = buddy_getname(BUDDATA(current_buddy));
855 btype = buddy_gettype(BUDDATA(current_buddy)); 869 btype = buddy_gettype(BUDDATA(current_buddy));
856 870
857 isgrp = btype & ROSTER_TYPE_GROUP; 871 isgrp = btype & ROSTER_TYPE_GROUP;
858 ismuc = btype & ROSTER_TYPE_ROOM; 872 ismuc = btype & ROSTER_TYPE_ROOM;
859
860 // Clear the line
861 werase(chatstatusWnd);
862
863 if (chatmode)
864 wprintw(chatstatusWnd, "~");
865 873
866 if (isgrp) { 874 if (isgrp) {
867 buf_locale = from_utf8(fullname); 875 buf_locale = from_utf8(fullname);
868 mvwprintw(chatstatusWnd, 0, 5, "Group: %s", buf_locale); 876 mvwprintw(chatstatusWnd, 0, 5, "Group: %s", buf_locale);
869 g_free(buf_locale); 877 g_free(buf_locale);