Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gnome-control-center
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GNOME
gnome-control-center
Commits
3216c6b9
Commit
3216c6b9
authored
1 year ago
by
Jeremy Bícha
Browse files
Options
Downloads
Patches
Plain Diff
Cherry-pick patch to fix mirror mode crash when monitor resolutions don't match
LP: #2026228
parent
85bd8908
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/Check-best_mode-exist-before-adding-flag.patch
+27
-0
27 additions, 0 deletions
...an/patches/Check-best_mode-exist-before-adding-flag.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
28 additions
and
0 deletions
debian/patches/Check-best_mode-exist-before-adding-flag.patch
0 → 100644
+
27
−
0
View file @
3216c6b9
From: Dirk Su <dirk.su@canonical.com>
Date: Mon, 26 Jun 2023 16:38:48 +0800
Subject: Check best_mode exist before adding flag
When there is no compatible clone mode, the best_mode will be NULL
. It will cause gnome-control-center crash when access to the
variable.
(cherry picked from commit b7c0c42317db9bea85cbf83667babf2d73a10b4a)
---
panels/display/cc-display-config-dbus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/panels/display/cc-display-config-dbus.c b/panels/display/cc-display-config-dbus.c
index e054d00..e6733ec 100644
--- a/panels/display/cc-display-config-dbus.c
+++ b/panels/display/cc-display-config-dbus.c
@@ -1440,7 +1440,8 @@
cc_display_config_dbus_generate_cloning_modes (CcDisplayConfig *pself)
best_mode = virtual_mode;
}
- best_mode->flags |= MODE_PREFERRED;
+ if (best_mode)
+ best_mode->flags |= MODE_PREFERRED;
return clone_modes;
}
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
3216c6b9
...
...
@@ -30,3 +30,4 @@ ubuntu/sound-Add-a-button-to-select-the-default-theme.patch
ubuntu/applications-Launch-snap-store-if-it-is-installed.patch
ubuntu/display-Allow-fractional-scaling-to-be-enabled.patch
ubuntu/mouse-Add-animations-following-the-accent-colors.patch
Check-best_mode-exist-before-adding-flag.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment