[glib] gdesktopappinfo: Handle g_get_prgname() being NULL
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gdesktopappinfo: Handle g_get_prgname() being NULL
- Date: Wed, 16 Feb 2011 18:59:16 +0000 (UTC)
commit a7faf0b16ee7cb32e8e0206a5fa5b10069a79e89
Author: Colin Walters <walters verbum org>
Date: Wed Feb 16 13:49:20 2011 -0500
gdesktopappinfo: Handle g_get_prgname() being NULL
Reported-By: Sebastien Bacher <seb128 ubuntu com>
https://bugzilla.gnome.org/show_bug.cgi?id=642490
gio/gdesktopappinfo.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 987f073..61ef54c 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -963,9 +963,10 @@ notify_desktop_launch (GDBusConnection *session_bus,
g_variant_builder_add (&extras_variant, "{sv}",
"origin-desktop-file",
g_variant_new_bytestring (gio_desktop_file));
- g_variant_builder_add (&extras_variant, "{sv}",
- "origin-prgname",
- g_variant_new_bytestring (g_get_prgname ()));
+ if (g_get_prgname () != NULL)
+ g_variant_builder_add (&extras_variant, "{sv}",
+ "origin-prgname",
+ g_variant_new_bytestring (g_get_prgname ()));
g_variant_builder_add (&extras_variant, "{sv}",
"origin-pid",
g_variant_new ("x",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]