Fix potential crash when a thesaurus finishes loading

This commit is contained in:
Thomas Goyne 2014-01-11 07:48:27 -08:00
parent 5cfb76fe9a
commit cf79e521e4

View file

@ -103,7 +103,7 @@ void Thesaurus::OnLanguageChanged() {
agi::dispatch::Background().Async([=]{
try {
auto thes = agi::util::make_unique<agi::Thesaurus>(dat, idx);
agi::dispatch::Main().Sync([&]{
agi::dispatch::Main().Sync([&thes, this]{
impl = std::move(thes);
});
}