Skip to content

Commit

Permalink
fix double initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Oct 10, 2024
1 parent 7cc0940 commit 0269ebf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fcitx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ void Fcitx::setupInstance() {
dispatcher_->attach(&instance_->eventLoop());
}

void Fcitx::exec() { instance_->exec(); }
void Fcitx::exec() { instance_->eventLoop().exec(); }

void Fcitx::exit() {
// the fcitx instance may have been destroyed by stop_fcitx_thread.
if (dispatcher_)
dispatcher_->detach();
if (instance_)
instance_->exit();
instance_->eventLoop().exit();
}

void Fcitx::schedule(std::function<void()> func) {
Expand Down

0 comments on commit 0269ebf

Please sign in to comment.