Scoped lock

This commit is contained in:
Lander Gallastegi 2024-10-04 18:36:41 +02:00
parent b95576f6e3
commit cda002e0fd

View File

@ -87,6 +87,8 @@ ImeDialogState::~ImeDialogState() {
} }
bool ImeDialogState::CallTextFilter() { bool ImeDialogState::CallTextFilter() {
std::scoped_lock lock(mutex);
if (!text_filter || !input_changed) { if (!text_filter || !input_changed) {
return true; return true;
} }
@ -299,8 +301,6 @@ void ImeDialogUi::Draw() {
return; return;
} }
std::scoped_lock lock2{state->mutex};
const auto& ctx = *GetCurrentContext(); const auto& ctx = *GetCurrentContext();
const auto& io = ctx.IO; const auto& io = ctx.IO;