From 01290d18d36e5f73ad5546e440fa267e5f67db45 Mon Sep 17 00:00:00 2001 From: portix Date: Tue, 17 Apr 2012 12:05:57 +0200 Subject: Create signal- and io-object, implementing io.setFile/io.getFile --HG-- branch : scripts --- src/util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 8c0ffb4b..b216f469 100644 --- a/src/util.c +++ b/src/util.c @@ -339,6 +339,9 @@ util_set_file_content(const char *filename, const char *content) { char *dname = NULL; char *realpath = NULL; char buffer[PATH_MAX]; + if (content == NULL || filename == NULL) + return false; + filename = util_expand_home(buffer, filename, PATH_MAX); if (g_file_test(filename, G_FILE_TEST_IS_SYMLINK)) { link = g_file_read_link(filename, &error); -- cgit v1.2.3