aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-04-14 21:36:39 +0000
committerThierry Vignaud <tv@mandriva.org>2008-04-14 21:36:39 +0000
commitc370dc062a46869c5a955658ade1a15d621dc4f9 (patch)
tree46500667545489ff17dbc5e23472e07e9c55ed31
parenta5ac960c3b430c4cef646e31d6ac72b87b66862f (diff)
downloadrpmdrake-c370dc062a46869c5a955658ade1a15d621dc4f9.tar
rpmdrake-c370dc062a46869c5a955658ade1a15d621dc4f9.tar.gz
rpmdrake-c370dc062a46869c5a955658ade1a15d621dc4f9.tar.bz2
rpmdrake-c370dc062a46869c5a955658ade1a15d621dc4f9.tar.xz
rpmdrake-c370dc062a46869c5a955658ade1a15d621dc4f9.zip
(run_treeview_dialog) fix a crash when default view is unknown (#40025)
-rw-r--r--NEWS1
-rwxr-xr-xrpmdrake6
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 951af1d7..8dff0135 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- rpmdrake:
o fix searching when numeric pad's return key is pressed
+ o fix a crash when default view is unknown (#40025)
Version 4.9.13 - 3 April 2008, Thierry Vignaud
diff --git a/rpmdrake b/rpmdrake
index 9db39423..b8abb61b 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -584,7 +584,11 @@ sub run_treeview_dialog {
# to retrieve a path, one must prevent "accelerators completion":
my $get_path = sub { return join('', map { my $i = $_; $i =~ s/_//g; $i } @_) };
- $factory->get_item('<main>' . $get_path->(N("/_View") . '/' . $modes{$mode->[0]}))->set_active(1);
+ if (my $widget = $factory->get_item('<main>' . $get_path->(N("/_View") . '/' . $modes{$mode->[0]}))) {
+ $widget->set_active(1);
+ } else {
+ warn "Impossible to set $mode->[0] view as default\n";
+ }
%check_boxes = map {
$_ => $factory->get_widget("<main>" . $get_path->($auto_string));