Skip to content

Commit

Permalink
fix: crash on select_schema .default
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Apr 25, 2024
1 parent 31b591d commit ef08da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rime/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ef08da3

Please sign in to comment.