[gnome-boxes/release-gnome-3-36-2: 9/10] util-app: Account for Medias without URLs in serilize_os_title
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/release-gnome-3-36-2: 9/10] util-app: Account for Medias without URLs in serilize_os_title
- Date: Mon, 30 Mar 2020 14:02:54 +0000 (UTC)
commit d74f61ca827baf21474bdddced646773bfae933b
Author: Felipe Borges <felipeborges gnome org>
Date: Thu Mar 26 12:59:33 2020 +0100
util-app: Account for Medias without URLs in serilize_os_title
RHEL doesn't ship a direct URL, but a custom authentication dialog
instead.
src/util-app.vala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/util-app.vala b/src/util-app.vala
index 0aa4af98..a41f28bd 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -133,9 +133,10 @@ else if ((media.os as Osinfo.Product).name != null) {
if (media.url != null && media.url.contains ("server"))
variant += " Server";
} else {
- var file = File.new_for_uri (media.url);
-
- title = file.get_basename ().replace ("_", "");
+ if (media.url != null) {
+ var file = File.new_for_uri (media.url);
+ title = file.get_basename ().replace ("_", "");
+ }
}
var subvariant = "";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]