X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=sidebar.c;h=f5206c9ecb9d39e648d3f62237f11224ccb02932;hb=004f8d226cb42f93c0025b0ed3a6edf87d7bb8a0;hp=5089989621c0390e74947aa1db4831d1396c6378;hpb=cc3d47bfac671f147aa0822cd5ecdc84e91de979;p=apps%2Fmadmutt.git diff --git a/sidebar.c b/sidebar.c index 5089989..f5206c9 100644 --- a/sidebar.c +++ b/sidebar.c @@ -207,6 +207,8 @@ void set_curbuffy(char buf[LONG_STRING]) void set_buffystats (CONTEXT* Context) { BUFFY* tmp = Incoming; + if (!Context) + return; while (tmp) { if (strcmp (tmp->path, Context->path) == 0) @@ -330,9 +332,10 @@ BUFFY * exist_prev_new() void scroll_sidebar(int op, int menu) { - if(!SidebarWidth) return; - if(!CurBuffy) return; - BUFFY *tmp; + BUFFY *tmp; + + if(!SidebarWidth) return; + if(!CurBuffy) return; switch (op) { case OP_SIDEBAR_NEXT: