From c524e177985e90342b13cac28abc7f454f710b2d Mon Sep 17 00:00:00 2001 From: Jeremias Ortega Date: Sat, 30 Jan 2021 18:38:43 -0600 Subject: [PATCH] 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 0bd704fc..19992edd 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