[geary: 1/2] application-client: Check for null when getting os info
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 1/2] application-client: Check for null when getting os info
- Date: Sun, 31 Jan 2021 01:04:57 +0000 (UTC)
commit c524e177985e90342b13cac28abc7f454f710b2d
Author: Jeremias Ortega <jeremias ortega tech>
Date: Sat Jan 30 18:38:43 2021 -0600
application-client: Check for null when getting os info
This caused a crash in the inspector system view when the os info wasn't
available.
Related to https://gitlab.gnome.org/GNOME/geary/-/issues/1123
src/client/application/application-client.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index 0bd704fc7..19992eddf 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -304,12 +304,14 @@ public class Application.Client : Gtk.Application {
/// Application runtime information label
info.add({ _("Distribution name"),
- GLib.Environment.get_os_info(GLib.OsInfoKey.NAME)
+ GLib.Environment.get_os_info(GLib.OsInfoKey.NAME) ??
+ _("Unknown")
});
/// Application runtime information label
info.add({_("Distribution release"),
- GLib.Environment.get_os_info(GLib.OsInfoKey.VERSION)
+ GLib.Environment.get_os_info(GLib.OsInfoKey.VERSION) ??
+ _("Unknown")
});
/// Application runtime information label
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]