diff options
author | Brendan Taylor <whateley@gmail.com> | 2009-06-23 20:30:40 -0600 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2009-06-23 20:30:40 -0600 |
commit | b1ae2b5ae4b201fc6971004aa4bb8910aeb8b42b (patch) | |
tree | 2aa8d5da9b7733c9a15867f5667eee90bd6b936a /uzbl.c | |
parent | 12af838675fa5eae32a8b97cf8fe81c2c812639f (diff) |
don't segfault on 'set' without arguments.
fixes FS#44
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -704,9 +704,11 @@ static void set_var(WebKitWebView *page, GArray *argv) { (void) page; gchar **split = g_strsplit(argv_idx(argv, 0), "=", 2); - gchar *value = parseenv(g_strdup(split[1] ? g_strchug(split[1]) : " ")); - set_var_value(g_strstrip(split[0]), value); - g_free(value); + if (split[0] != NULL) { + gchar *value = parseenv(g_strdup(split[1] ? g_strchug(split[1]) : " ")); + set_var_value(g_strstrip(split[0]), value); + g_free(value); + } g_strfreev(split); } |