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 a29c6150b9
commit 108cdbfaca

View File

@ -1258,6 +1258,10 @@ compare_dirs_cmd (void)
void void
diff_view_cmd (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 (); dview_diff_cmd ();
if (mc_global.mc_run_mode == MC_RUN_FULL) if (mc_global.mc_run_mode == MC_RUN_FULL)