summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive/gtk.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 3b10a3e9e..0438dfdd0 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -602,7 +602,10 @@ sub ask_fromW {
}
};
$get = sub {
- my $s = $model ? { reverse %{$model->{indexes}} }->{$w->get_active} : $w->get_text;
+ my $s;
+ if ($model) {
+ $s = { reverse %{$model->{indexes}} }->{$w->get_active};
+ } else { $s = $w->get_text }
my $i = eval { find_index { $s eq $_ } @formatted_list };
defined $i ? $e->{list}[$i] : $s;
};