Andreas Krennmair:
[apps/madmutt.git] / sidebar.c
index 5089989..f5206c9 100644 (file)
--- 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: