mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
swaybg: remove assert crashing on hotplug
When hotplugging, an output may disappear and re-appear. This commit makes it so swaybg doesn't crash anymore in this case.
This commit is contained in:
parent
695948e689
commit
1ecc289543
1 changed files with 1 additions and 2 deletions
|
|
@ -194,8 +194,7 @@ static void xdg_output_handle_name(void *data,
|
|||
struct zxdg_output_v1 *xdg_output, const char *name) {
|
||||
struct swaybg_output *output = data;
|
||||
struct swaybg_state *state = output->state;
|
||||
if (strcmp(name, state->args->output) == 0) {
|
||||
assert(state->output == NULL);
|
||||
if (strcmp(name, state->args->output) == 0 && state->output == NULL) {
|
||||
state->output = output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue