aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-02-21 19:17:24 +0000
committerThierry Vignaud <tv@mandriva.org>2007-02-21 19:17:24 +0000
commitf692c99713fb19756a146ef8bf8a8c833cc7fb82 (patch)
treee49071ad2067b067332b05f48a55b6acc9f86aa2 /Rpmdrake
parent89a267bd4d1956c85fddb57d3950ee1bbae2f0ba (diff)
downloadrpmdrake-f692c99713fb19756a146ef8bf8a8c833cc7fb82.tar
rpmdrake-f692c99713fb19756a146ef8bf8a8c833cc7fb82.tar.gz
rpmdrake-f692c99713fb19756a146ef8bf8a8c833cc7fb82.tar.bz2
rpmdrake-f692c99713fb19756a146ef8bf8a8c833cc7fb82.tar.xz
rpmdrake-f692c99713fb19756a146ef8bf8a8c833cc7fb82.zip
(perform_removal) fix crash
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-xRpmdrake/pkg.pm3
1 files changed, 2 insertions, 1 deletions
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)