[gtk+] application: Really allow NULL application-id



commit 75331c0ac289a065d66580bf52502c41b8af9cc7
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.

 gtk/gtkapplication.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index c46d456..2b87b9c 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -789,7 +789,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]