From edffd820573a3b2cc5fb4015880d8ee19da58886 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 27 Jun 2024 09:48:38 +0200 Subject: [PATCH] Config undo queuing bug fixed --- conf/conf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/conf.c b/conf/conf.c index 77740bb8..9f259691 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -358,8 +358,16 @@ config_done(void) if (future_cftype) { int type = future_cftype; + struct config *fc = OBSREF_GET(future_config); - CONFIG_REF_LOCAL(conf, OBSREF_GET(future_config)); + if (type == RECONFIG_UNDO) + { + ASSERT_DIE(!fc); + ASSERT_DIE(old_config); + fc = old_config; + } + + CONFIG_REF_LOCAL(conf, fc); future_cftype = RECONFIG_NONE; OBSREF_CLEAR(future_config);