From 108cdbfaca45af5f320873db459e0459ee72965b Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 1 Apr 2012 10:00:47 +0400 Subject: [PATCH] Ticket #2769: crash on compare files if one panel is not in the listing mode. Added check of panel types before run file comparision. Signed-off-by: Andrew Borodin --- src/filemanager/cmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 3dd7ca224..c2ecb0288 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -1258,6 +1258,10 @@ compare_dirs_cmd (void) void diff_view_cmd (void) { + /* both panels must be in the list mode */ + if (get_current_type () != view_listing || get_other_type () != view_listing) + return; + dview_diff_cmd (); if (mc_global.mc_run_mode == MC_RUN_FULL)