diff options
-rw-r--r-- | perl-install/ugtk2.pm | 10 |
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); + }; } |