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