[gtk+/gtk-3-4] GtkApplication: fix for NULL application ID



commit ab2ce66856d1fbb65f8372eccd7f4ed8c0385105
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Apr 30 14:59:19 2012 -0400

    GtkApplication: fix for NULL application ID
    
    Deal with the possibility of a NULL application ID by updating our
    copied logic from GLib: use a path of /org/gtk/Application/anonymous in
    this case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671249

 gtk/gtkapplication.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 6a2e6f3..3126b8b 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -279,6 +279,9 @@ object_path_from_appid (const gchar *appid)
 {
   gchar *appid_path, *iter;
 
+  if (appid == NULL)
+    return g_strdup ("/org/gtk/Application/anonymous");
+
   appid_path = g_strconcat ("/", appid, NULL);
   for (iter = appid_path; *iter; iter++)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]