diff options
author | Walter Lozano <walter.lozano@collabora.com> | 2020-10-08 02:19:45 +0000 |
---|---|---|
committer | Walter Lozano <walter.lozano@collabora.com> | 2020-10-08 10:14:38 -0300 |
commit | 51a77a42b4003d25fbf8193ae6122fd95fd1489a (patch) | |
tree | b70767fc10016d7e876ed0dfe3efde7bdf3363dd | |
parent | 9bb8ea6f6156502bf1639ce349907b391e9b124d (diff) |
main: Create black surface after listening socket
If agl-compositor is started without XDG_RUNTIME_DIR defined, an error
arises and the system tries to exit cleanly. However, in this process a
segfault is produced and the terminal is left misconfigured.
The cause of this segfault is related to the destruction of the black
surface, which is not handled properly in this corner case.
In order to avoid this issue and as an initial fix, create the surface
after the listening socket, which causes that the check for the var
XDG_RUNTIME_DIR to be done before the surface creation.
Bug-AGL: SPEC-3623
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: I04760828f9ce5b5a6d4a31aeccdefe779a1c15a3
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1489,11 +1489,11 @@ int main(int argc, char *argv[]) if (ivi.remoting_api) ivi_enable_remote_outputs(&ivi); - ivi_shell_init_black_fs(&ivi); - if (create_listening_socket(display, socket_name) < 0) goto error_compositor; + ivi_shell_init_black_fs(&ivi); + ivi.compositor->exit = handle_exit; weston_compositor_wake(ivi.compositor); |