From ef08da3a728f3be6154c047a9f877f3fc01fcda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E6=88=8E=E6=B0=8F?= Date: Thu, 25 Apr 2024 13:19:24 +0800 Subject: [PATCH] fix: crash on select_schema .default --- src/rime/engine.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rime/engine.cc b/src/rime/engine.cc index 44406c070..07aa6b7d7 100644 --- a/src/rime/engine.cc +++ b/src/rime/engine.cc @@ -284,13 +284,13 @@ void ConcreteEngine::OnSelect(Context* ctx) { void ConcreteEngine::ApplySchema(Schema* schema) { if (!schema) return; - switcher_->SetActiveSchema(schema->schema_id()); schema_.reset(schema); context_->Clear(); context_->ClearTransientOptions(); InitializeComponents(); InitializeOptions(); - message_sink_("schema", schema->schema_id() + "/" + schema->schema_name()); + switcher_->SetActiveSchema(schema_->schema_id()); + message_sink_("schema", schema_->schema_id() + "/" + schema_->schema_name()); } void ConcreteEngine::InitializeComponents() {