summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r--perl-install/interactive/gtk.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 1bf642e47..5df2d1c4d 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -396,7 +396,7 @@ sub create_widget {
} elsif ($e->{type} eq 'button') {
$w = Gtk2::Button->new_with_label('');
$w->signal_connect(clicked => $e->{clicked_may_quit_cooked});
- $set = sub { $w->child->set_label(may_apply($e->{format}, $_[0])) };
+ $set = sub { $w->child && $w->child->set_label(may_apply($e->{format}, $_[0])) };
} elsif ($e->{type} eq 'range') {
my $adj = Gtk2::Adjustment->new(${$e->{val}}, $e->{min}, $e->{max} + ($e->{SpinButton} ? 0 : 1), 1, ($e->{max} - $e->{min}) / 10, 1);
$w = $e->{SpinButton} ? Gtk2::SpinButton->new($adj, 10, 0) : Gtk2::HScale->new($adj);