summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-10-06 11:38:27 +0200
committerRobert Ancell <robert.ancell@gmail.com>2020-10-12 03:22:15 +0000
commit66c81d8128e55cd1f19efdd59b4f0ee2e61dab25 (patch)
tree78c80911ea69453e3b5fb82b7bf08e1a83cb469b
parent35f3eb9b2221c3e478b411ca51b017393e19d9ca (diff)
downloadgnome-control-center-66c81d8128e55cd1f19efdd59b4f0ee2e61dab25.tar.gz
display: Fix possible recursion when configuration type changes
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