aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-25 09:36:25 +0200
committerGitHub <noreply@github.com>2018-09-25 09:36:25 +0200
commit08815f9cfb4d0e93d69997cb229333326212744b (patch)
tree9d414feadd74c7e015fe9ca4064d9a185de42cbe /sway
parenta032925ae7667e917f2bd8d1b77de97b400b3bf7 (diff)
parentb1a0e95e8e6ecf66542cc62e6109949de59afb5e (diff)
Merge pull request #2708 from RyanDwyer/fix-output-disconnect-crash
Fix crash when disconnecting output
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/container.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 53b127b7..329145cf 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -985,7 +985,8 @@ void container_discover_outputs(struct sway_container *con) {
}
}
struct sway_output *new_output = container_get_effective_output(con);
- double old_scale = old_output ? old_output->wlr_output->scale : -1;
+ double old_scale = old_output && old_output->enabled ?
+ old_output->wlr_output->scale : -1;
double new_scale = new_output ? new_output->wlr_output->scale : -1;
if (old_scale != new_scale) {
container_update_title_textures(con);