summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <none@none>2012-04-17 12:05:57 +0200
committerportix <none@none>2012-04-17 12:05:57 +0200
commit01290d18d36e5f73ad5546e440fa267e5f67db45 (patch)
tree0bdfbdef044c6831ca16472f3ff65314a9c5253f /src/util.c
parent724b3b4812f8d19eb684667e7ea5842a82280fc8 (diff)
downloaddwb-01290d18d36e5f73ad5546e440fa267e5f67db45.zip
Create signal- and io-object, implementing io.setFile/io.getFile
--HG-- branch : scripts
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
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);