summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-06-17 16:37:56 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-06-17 16:38:54 +0900
commit3babdd927a0dfe49b9aa45854bea95bcf0de838b (patch)
tree7792554734a10af64ace64b6b546b9ae025ea55e
parentf1880425f7c5791eac3a2d7f2690244ad88d0ffe (diff)
elm config files - don't write to file if file handle is null
fixes seg with new file only config for elm
-rw-r--r--src/lib/elm_config.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 92dd8aa73..de77af545 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -3338,9 +3338,13 @@ _elm_config_sub_init(void)
3338 _elm_profile); 3338 _elm_profile);
3339 if (!ecore_file_exists(buf)) 3339 if (!ecore_file_exists(buf))
3340 { 3340 {
3341 FILE *fp = fopen(buf, "w+"); 3341 FILE *f = fopen(buf, "w+");
3342 fprintf(fp, "flush"); 3342
3343 fclose(fp); 3343 if (f)
3344 {
3345 fprintf(f, "flush");
3346 fclose(f);
3347 }
3344 } 3348 }
3345 _eio_monitor = eio_monitor_add(buf); 3349 _eio_monitor = eio_monitor_add(buf);
3346 ecore_event_handler_add(EIO_MONITOR_FILE_MODIFIED, _elm_config_file_monitor_cb, NULL); 3350 ecore_event_handler_add(EIO_MONITOR_FILE_MODIFIED, _elm_config_file_monitor_cb, NULL);