diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index dcca6100ca2..ffe2cfbf699 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -105,25 +105,34 @@ my $optdocstate; push @::info_hook, sub { + return unless defined $mainwindow; update_status(join(" ",@_)); $mainwindow->update; }; push @::warn_hook, sub { + return unless defined $mainwindow ; update_status(join(" ",@_)); $mainwindow->update; }; push @::install_packages_hook, \&update_progressbar; push @::install_packages_hook, - sub { $mainwindow->update; $::sww->update; }; + sub { + return unless defined $mainwindow; + return unless defined $::sww; + $mainwindow->update; + $::sww->update; + }; sub update_status { my ($p) = @_; + return unless defined $::progressw; $::progressw->insert("end", "$p"); $::progressw->see("end"); } sub update_progressbar { my ($n,$total) = @_; + return unless defined $::progress; if (defined($n) && defined($total)) { $::progress->value(int($n*100/$total)); } |