[glib] Deal gracefully with NULL log domains



commit 1a08591c3a953d53fb22b8da59b2023d278590d6
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 16 21:42:28 2011 -0500

    Deal gracefully with NULL log domains

 glib/gmessages.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gmessages.c b/glib/gmessages.c
index ef62d23..726d9f2 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -1190,7 +1190,7 @@ g_log_default_handler (const gchar   *log_domain,
   domains = g_getenv ("G_MESSAGES_DEBUG");
   if (((log_level & INFO_LEVELS) == 0) ||
       domains == NULL ||
-      (strcmp (domains, "all") != 0 && !strstr (domains, log_domain)))
+      (strcmp (domains, "all") != 0 && (!log_domain || !strstr (domains, log_domain))))
     return;
 
  emit:



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