[gnome-boxes/identify-os-fixups: 1/2] identify-os-popover: Don't crash if DB can't be loaded
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/identify-os-fixups: 1/2] identify-os-popover: Don't crash if DB can't be loaded
- Date: Wed, 5 Aug 2020 14:12:32 +0000 (UTC)
commit 2e285cd91ae82ff54e02a7830f2747d501f4c697
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Aug 5 16:08:09 2020 +0200
identify-os-popover: Don't crash if DB can't be loaded
src/assistant/identify-os-popover.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/assistant/identify-os-popover.vala b/src/assistant/identify-os-popover.vala
index f8d2b471..b0933524 100644
--- a/src/assistant/identify-os-popover.vala
+++ b/src/assistant/identify-os-popover.vala
@@ -21,9 +21,13 @@ public IdentifyOsPopover () {
}
private async void setup_model () {
- var media_manager = MediaManager.get_instance ();
+ try {
+ var media_manager = MediaManager.get_instance ();
+ os_list = yield media_manager.os_db.get_all_oses_sorted_by_release_date ();
+ } catch (GLib.Error error) {
+ warning ("Failed to load OS list: %s", error.message);
+ }
- os_list = yield media_manager.os_db.get_all_oses_sorted_by_release_date ();
model = new GLib.ListStore (typeof (Osinfo.Os));
yield purge_model ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]