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 <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-04-01 10:00:47 +04:00
parent c494f7b3bb
commit 809f668717

View File

@ -1329,6 +1329,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)