[gtk+/gtk-3-4] application: Really allow NULL application-id



commit 580a83b1ab2206e7352a51b9f142386e1c0a3b1c
Author: Christian Persch <chpe gnome org>
Date:   Tue Jun 12 16:13:06 2012 +0200

    application: Really allow NULL application-id
    
    While the docs were adjusted to claim that NULL application-id is allowed,
    the code actually segfaulted on it.
    (cherry picked from commit 69d6e7110094fed2cc8770683ac57a61f84949ff)

 gtk/gtkapplication.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 5d585f7..76c852c 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -811,7 +811,7 @@ GtkApplication *
 gtk_application_new (const gchar       *application_id,
                      GApplicationFlags  flags)
 {
-  g_return_val_if_fail (g_application_id_is_valid (application_id), NULL);
+  g_return_val_if_fail (application_id == NULL || g_application_id_is_valid (application_id), NULL);
 
   g_type_init ();
 



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