michaelforney / swc

a library for making a simple Wayland compositor
MIT License
627 stars 53 forks source link

Prevent segfault when ttyname() has an error. #22

Closed auntieNeo closed 9 years ago

auntieNeo commented 9 years ago

There is a segfault in open_tty when ttyname(3) encounters an error and returns NULL. I'm not sure what the error is exactly, but it occurs whenever I try to run swc-launch as a systemd service.

By ignoring the error, I can run swc-launch as a systemd service just fine.

michaelforney commented 9 years ago

Pushed with a minor style fix. Thanks!