diff options
author | Simon Ser <contact@emersion.fr> | 2022-05-26 21:24:46 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-05-26 15:42:56 -0400 |
commit | d0b9bf94a5c6e88b13c6fa7f9b41af0a94ea1a3e (patch) | |
tree | 7cd4e2a3d36becffe8c72ddcc3bac3ecb20216ec /sway/config/output.c | |
parent | f0d57da315ecbc44a444f76a7a8cde4045009453 (diff) |
Handle NULL output make/model/serial
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 88514ac0..aa4cf946 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -27,8 +27,10 @@ int output_name_cmp(const void *item, const void *data) { void output_get_identifier(char *identifier, size_t len, struct sway_output *output) { struct wlr_output *wlr_output = output->wlr_output; - snprintf(identifier, len, "%s %s %s", wlr_output->make, wlr_output->model, - wlr_output->serial); + snprintf(identifier, len, "%s %s %s", + wlr_output->make ? wlr_output->make : "Unknown", + wlr_output->model ? wlr_output->model : "Unknown", + wlr_output->serial ? wlr_output->serial : "Unknown"); } const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filter) { |