summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 6119d9881..1f43bdb4c 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1642,12 +1642,10 @@ sub get_text {
sub set_text {
my ($w, $val) = @_;
- find_index {
- if ($_ eq $val) {
- $w->set_active($::i);
- 1;
- }
- } @{$w->{strings}};
+ eval {
+ my $val_index = find_index { $_ eq $val } @{$w->{strings}};
+ $w->set_active($val_index);
+ };
}