From f692c99713fb19756a146ef8bf8a8c833cc7fb82 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 21 Feb 2007 19:17:24 +0000 Subject: (perform_removal) fix crash --- Rpmdrake/pkg.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index fe8a5315..c6a4aeeb 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -290,6 +290,7 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1); my $reset_update = sub { undef $prev_stage; $count = 0; $limit = $_[0] }; my $update = sub { + return if !$total; # don't die if there's no source $count++; $new_stage = $level+($limit-$level)*$count/$total; if ($prev_stage + 0.01 < $new_stage) { @@ -685,7 +686,7 @@ sub perform_removal { my @results; slow_func_statusbar( N("Please wait, removing packages..."), - $::main_window->{real_window}, + $::main_window, sub { @results = $::options{parallel} ? urpm::parallel::remove($urpm, \@toremove) -- cgit v1.2.1