diff options
author | Benjamin Berg <bberg@redhat.com> | 2019-10-10 09:51:55 +0200 |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2019-10-10 16:12:48 +0000 |
commit | 74687108af9241bd12d95a8391a54103ed2bcc78 (patch) | |
tree | 6e4395f672e7b4dd0a065428bd00d865c9e1a9eb | |
parent | 0d41cfd6b39935940aa573af3a2e0a1492e6aadc (diff) | |
download | gnome-control-center-benzea/fix-display-no-mode-scale-crash.tar.gz |
display: Use correct mode for supported scale checkingbenzea/fix-display-no-mode-scale-crash
Monitors may not always have a mode. This means we cannot look up the
mode on the fly, but instead need to have a heuristic to select a mode
if there is none.
Everything was in place already for this, except that one location was
still doing a fresh lookup, possibly causing a crash.
Fixes: #675
-rw-r--r-- | panels/display/cc-display-settings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/panels/display/cc-display-settings.c b/panels/display/cc-display-settings.c index fe2643ede..d793fccaa 100644 --- a/panels/display/cc-display-settings.c +++ b/panels/display/cc-display-settings.c @@ -397,7 +397,7 @@ cc_display_settings_rebuild_ui (CcDisplaySettings *self) GtkWidget *scale_btn; if (!cc_display_config_is_scaled_mode_valid (self->config, - cc_display_monitor_get_mode (self->selected_output), + current_mode, *scale) && cc_display_monitor_get_scale (self->selected_output) != *scale) continue; |