Package: mc
Version: 4.5.55-1.2
Author: Guillem Jover <guillem@hadrons.org>
Status: fixed
Debbug: 144460
Description:
 Prevent segfault in mcedit by disallowing access to any panel.


--- main.c	Thu Apr 25 04:38:31 2002
+++ main.c.fix1	Thu Apr 25 04:45:41 2002
@@ -161,6 +161,9 @@
 WPanel *left_panel;
 WPanel *right_panel;
 
+/* XXX: To prevent mcedit using panels not initialized */
+int have_panels = 0;
+
 /* The pointer to the tree */
 WTree *the_tree;
 
@@ -532,6 +535,9 @@
     int reload_other = !(force_update & UP_ONLY_CURRENT);
     WPanel *panel;
 
+    if (!have_panels)
+	return;
+
     update_one_panel (get_current_index (), force_update, current_file);
     if (reload_other)
 	update_one_panel (get_other_index (), force_update, UP_KEEPSEL);
@@ -2196,6 +2202,8 @@
     
     init_labels (get_panel_widget (0));
     init_labels (get_panel_widget (1));
+
+    have_panels = 1;
 
     /* Run the Midnight Commander if no file was specified in the command line */
     run_dlg (midnight_dlg);
