weston: arm SEGV handler earlier
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 11 Oct 2017 12:17:47 +0000 (15:17 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 27 Nov 2017 13:41:18 +0000 (15:41 +0200)
commit3baf9ce7e80da5fc15dbc7b413f99081f344aaa9
tree426ac8c0494268a5d8b4bd02cbd26ca10872eafe
parent409b01fd6dad591b42e4f43c37b4e8c833422968
weston: arm SEGV handler earlier

It is useful to print the backtrace regardless of whether we have a
compositor and a backend initialized yet. Move catch_signals() to the
earliest point in main() and protect the SEGV handler from dereferencing
NULL when we don't yet have a compositor or a backend.

The SEGV handler uses weston_log(), so cannot move catch_signals() any
earlier.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
compositor/main.c