main: Guard against NULL log_domain in default handler
g_str_has_prefix() will assert when passed NULL, so we need to make sure that we are passed a non-NULL log_domain first. Spotted by <goughost<at>yahoo.com.cn> https://bugzilla.gnome.org/show_bug.cgi?id=663601
This commit is contained in:
parent
62ca4ba624
commit
acffd1e792
@ -284,7 +284,7 @@ default_log_handler (const char *log_domain,
|
|||||||
|
|
||||||
/* Filter out telepathy-glib logs, we don't want to flood Shell's output
|
/* Filter out telepathy-glib logs, we don't want to flood Shell's output
|
||||||
* with those. */
|
* with those. */
|
||||||
if (!g_str_has_prefix (log_domain, "tp-glib"))
|
if (!log_domain || !g_str_has_prefix (log_domain, "tp-glib"))
|
||||||
g_log_default_handler (log_domain, log_level, message, data);
|
g_log_default_handler (log_domain, log_level, message, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user