From 15c46860d39e395b20cb4dbfa65be89443ee3e98 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Tue, 9 Sep 2014 22:22:27 +0200 Subject: Fixed a crash if no media configured --- lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm') diff --git a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm index 154f304..3221f26 100644 --- a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm +++ b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm @@ -1661,7 +1661,9 @@ sub mainwindow() { $factory->createHSpacing($hbox, 1.0); my $enabled = $factory->createCheckBox($factory->createLeft($hbox), $loc->N("Enabled")); my $update = $factory->createCheckBox($factory->createLeft($hbox), $loc->N("Updates")); - _showMediaStatus({item => $item, enabled => $enabled, updates => $update}); + eval { + _showMediaStatus({item => $item, enabled => $enabled, updates => $update}); + }; $update->setNotify(1); $enabled->setNotify(1); $update->setDisabled() if (!$::expert); -- cgit v1.2.1