summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Mielniczuk <rafal.mielniczuk2@gmail.com>2012-06-09 15:10:28 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-06-11 09:37:02 -0400
commit6e0a7d82b7bd99407aef87a0a266150ec3124336 (patch)
tree10526171f1d1a2005f1833b821f9a6c6714c0360
parentd64cf21246730778e3cdc92d0de2c8ffe918feed (diff)
compositor: change position of weston_log_file_open call
In case XDG_RUNTIME_DIR was not set, weston_log will crash the compositor instead of spitting error msg, as weston log was not yet opened
-rw-r--r--src/compositor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 3f54450..67a750f 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3170,13 +3170,13 @@ int main(int argc, char *argv[])
argc = parse_options(core_options,
ARRAY_LENGTH(core_options), argc, argv);
+ weston_log_file_open(log);
+
if (!getenv("XDG_RUNTIME_DIR")) {
weston_log(xdg_error_message);
exit(EXIT_FAILURE);
}
- weston_log_file_open(log);
-
gettimeofday(&tv, NULL);
brokendown_time = localtime(&tv.tv_sec);
strftime(buffer, sizeof buffer, "%Y-%m-%d %H:%M:%S", brokendown_time);