[Xfce4-commits] <garcon:master> Fix segfault if null is set.
Nick Schermer
noreply at xfce.org
Fri Apr 13 21:32:01 CEST 2012
Updating branch refs/heads/master
to 25896ce9536a7963bd9648ba9f9eb572b56fa961 (commit)
from 01f1edd2c8aa02b4603fbef5f3486956e8a8bd1e (commit)
commit 25896ce9536a7963bd9648ba9f9eb572b56fa961
Author: Nick Schermer <nick at xfce.org>
Date: Fri Apr 13 21:30:06 2012 +0200
Fix segfault if null is set.
garcon/garcon-private.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/garcon/garcon-private.c b/garcon/garcon-private.c
index bca7eba..a7d1a1f 100644
--- a/garcon/garcon-private.c
+++ b/garcon/garcon-private.c
@@ -33,6 +33,9 @@ garcon_looks_like_an_uri (const gchar *string)
{
const gchar *s = string;
+ if (G_UNLIKELY (string == NULL))
+ return FALSE;
+
/* <scheme> starts with an alpha character */
if (g_ascii_isalpha (*s))
{
More information about the Xfce4-commits
mailing list