summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-10-06 11:38:27 +0200
committerBenjamin Berg <bberg@redhat.com>2020-10-06 15:25:35 +0200
commite8a49da9c12417edb6e05e804c17293d0b61ad22 (patch)
tree469c13a32cf66d58d9765df04696f98853ea3bb0
parentfebfe1d63d4fe9d2dc01ff307b3b7646c005aeb0 (diff)
downloadgnome-control-center-benzea/fix-display-panel-recursion.tar.gz
display: Fix possible recursion when configuration type changesbenzea/fix-display-panel-recursion
The UI rebuilding code may change the configuration type, which in turn can trigger a UI rebuild. This should not be done if we are already updating the UI (but must be done otherwise, as that means the user has chosen to change the configuration). Fixes: #1141
-rw-r--r--panels/display/cc-display-panel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index dfca98cc6..949034442 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -254,7 +254,8 @@ config_ensure_of_type (CcDisplayPanel *panel, CcDisplayConfigType type)
g_assert_not_reached ();
}
- rebuild_ui (panel);
+ if (!panel->rebuilding_counter)
+ rebuild_ui (panel);
}
static void