diff options
author | Nick Schermer <nick@xfce.org> | 2012-04-13 21:30:06 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2012-04-13 21:30:06 +0200 |
commit | 25896ce9536a7963bd9648ba9f9eb572b56fa961 (patch) | |
tree | 0dc703f5127a1e8d7d4f814babf93e3a71ccf6b9 | |
parent | 01f1edd2c8aa02b4603fbef5f3486956e8a8bd1e (diff) | |
download | garcon-25896ce9536a7963bd9648ba9f9eb572b56fa961.tar.gz |
Fix segfault if null is set.
-rw-r--r-- | 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)) { |