diff options
author | 2018-02-19 14:55:28 -0800 | |
---|---|---|
committer | 2018-02-19 15:04:51 -0800 | |
commit | 6816253110df6316e708d58339f0829a6928265c (patch) | |
tree | 06b448190e834d752bcc1070c5b94b6dd728c038 /swaybg | |
parent | Merge pull request #1592 from dlrobertson/fix_mem_errors (diff) | |
download | sway-6816253110df6316e708d58339f0829a6928265c.tar.gz sway-6816253110df6316e708d58339f0829a6928265c.tar.zst sway-6816253110df6316e708d58339f0829a6928265c.zip |
Fix segfault if swaybg is run without Wayland
Mirrors a similar check in `swaylock/main.c`
Diffstat (limited to 'swaybg')
-rw-r--r-- | swaybg/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybg/main.c b/swaybg/main.c index 2fdd4220..3124ae3d 100644 --- a/swaybg/main.c +++ b/swaybg/main.c | |||
@@ -31,7 +31,9 @@ void sway_terminate(int exit_code) { | |||
31 | window_teardown(window); | 31 | window_teardown(window); |
32 | } | 32 | } |
33 | list_free(surfaces); | 33 | list_free(surfaces); |
34 | registry_teardown(registry); | 34 | if (registry) { |
35 | registry_teardown(registry); | ||
36 | } | ||
35 | exit(exit_code); | 37 | exit(exit_code); |
36 | } | 38 | } |
37 | 39 | ||