sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 686530d5e8f21ed146a489ad8a477f9241dfc722
parent a99970d7a3c9482e191af51b9a0d386cac647f66
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 23 Mar 2016 09:44:22 -0400

Merge pull request #535 from mikkeloscar/fix-swaylock-crash

swaylock: Fix crash when unable to connect to sway
Diffstat:
Mswaylock/main.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/swaylock/main.c b/swaylock/main.c @@ -31,7 +31,9 @@ void sway_terminate(int exit_code) { window_teardown(window); } list_free(surfaces); - registry_teardown(registry); + if (registry) { + registry_teardown(registry); + } exit(exit_code); } @@ -292,6 +294,10 @@ int main(int argc, char **argv) { surfaces = create_list(); registry = registry_poll(); + if (!registry) { + sway_abort("Unable to connect to wayland compositor"); + } + if (!registry->swaylock) { sway_abort("swaylock requires the compositor to support the swaylock extension."); }