c915d79
commit d2a9152cec8db6d21af77bb91490666a85e48d55
c915d79
Author: Andrew Borodin <aborodin@vmail.ru>
c915d79
Date:   Sat Mar 6 11:08:18 2010 +0300
c915d79
c915d79
    Ticket #2087: crash in standalone editor and viewer.
c915d79
    
c915d79
    Don't try update file manager panels if mc runs as standalone editor or viewer.
c915d79
    
c915d79
    Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
c915d79
c915d79
diff --git a/src/execute.c b/src/execute.c
c915d79
index e8f9ad3..16c0898 100644
c915d79
--- a/src/execute.c
c915d79
+++ b/src/execute.c
c915d79
@@ -304,8 +304,10 @@ toggle_panels (void)
c915d79
     }
c915d79
 #endif				/* HAVE_SUBSHELL_SUPPORT */
c915d79
 
c915d79
-    update_panels (UP_OPTIMIZE, UP_KEEPSEL);
c915d79
-    update_xterm_title_path ();
c915d79
+    if ((view_one_file == NULL) && (edit_one_file == NULL)) {
c915d79
+	update_panels (UP_OPTIMIZE, UP_KEEPSEL);
c915d79
+	update_xterm_title_path ();
c915d79
+    }
c915d79
     repaint_screen ();
c915d79
 }
c915d79