summaryrefslogtreecommitdiffstats
path: root/drakpxelinux.pl
diff options
context:
space:
mode:
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r--drakpxelinux.pl12
1 files changed, 7 insertions, 5 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl
index 9ece3c1..9e32697 100644
--- a/drakpxelinux.pl
+++ b/drakpxelinux.pl
@@ -1030,11 +1030,13 @@ sub refresh_menu() {
$menu_combo->signal_connect(changed => sub {
my $model_profiles = $profiles->get_model;
my $iter = $profiles->get_selection->get_selected;
- ($config_file, $help_file) = network::pxe::get_pxelinux_profile_path($model_profiles->get($iter, 0), 'boot');
- my $new_default = $menu_combo->get_active_text;
- substInFile {
- s/DEFAULT.*/DEFAULT $new_default/;
- } $config_file;
+ if ($iter) {
+ ($config_file, $help_file) = network::pxe::get_pxelinux_profile_path($model_profiles->get($iter, 0), 'boot');
+ my $new_default = $menu_combo->get_active_text;
+ substInFile {
+ s/DEFAULT.*/DEFAULT $new_default/;
+ } $config_file;
+ }
});
}