aboutsummaryrefslogtreecommitdiffstats
path: root/MageiaUpdate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-20 19:52:11 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-20 19:52:11 +0000
commite2e3418729b8b43399329554173819688997487f (patch)
treea0a79da8db2120597d93e1ba734d1e26beed57bf /MageiaUpdate
parent73f22cb2dfc39d8dcbebe304e414c81513d4dbe1 (diff)
downloadrpmdrake-e2e3418729b8b43399329554173819688997487f.tar
rpmdrake-e2e3418729b8b43399329554173819688997487f.tar.gz
rpmdrake-e2e3418729b8b43399329554173819688997487f.tar.bz2
rpmdrake-e2e3418729b8b43399329554173819688997487f.tar.xz
rpmdrake-e2e3418729b8b43399329554173819688997487f.zip
(toggle) fix a rare crash when some packages are installed twice (mga#4972)
I can reproduce the case but not the crash though (vivification must have occurred at some point but how?). Let's put some guard...
Diffstat (limited to 'MageiaUpdate')
-rwxr-xr-xMageiaUpdate4
1 files changed, 3 insertions, 1 deletions
diff --git a/MageiaUpdate b/MageiaUpdate
index 6db84c4e..e3aba283 100755
--- a/MageiaUpdate
+++ b/MageiaUpdate
@@ -111,7 +111,9 @@ sub toggle {
my $val = $pkgs->{$name}{selected};
my $old_status = $val ? 'to_install' : 'to_update';
my $done;
- $pkgs->{$name}{pkg}->set_flag_skip(0);
+ my $pkg = $pkgs->{$name}{pkg};
+ return if !$pkg;
+ $pkg->set_flag_skip(0);
toggle_nodes($w->{real_window}->window, $list->get_model, sub {
my ($leaf, $_state, $_model) = @_;
$done = 1;