From e2e3418729b8b43399329554173819688997487f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Mar 2012 19:52:11 +0000 Subject: (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... --- MageiaUpdate | 4 +++- NEWS | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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; diff --git a/NEWS b/NEWS index d4a58a90..b85f6c39 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- fix a rare crash when some packages are installed twice (mga#4972) + Version 5.30 - 02 March 2012, Thierry Vignaud - separate paragraphs when displaing READMEs (mga#4697) -- cgit v1.2.1