File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -456,11 +456,15 @@ void Graphics::set_vertical_fov(bool enable) {
456456 if (m_ultrawide_fov->value () && get_fov_method != nullptr && set_fov_method != nullptr && get_aspect_method != nullptr ) {
457457 const auto fov = get_fov_method->call <float >(sdk::get_thread_context (), camera);
458458
459- if (!m_fov_map.contains (camera)) {
460- m_fov_map[camera] = fov;
461- utility::re_managed_object::add_ref (camera);
462- } else {
463- m_fov_map[camera] = fov;
459+ {
460+ std::scoped_lock _{m_fov_mutex};
461+
462+ if (!m_fov_map.contains (camera)) {
463+ m_fov_map[camera] = fov;
464+ utility::re_managed_object::add_ref (camera);
465+ } else {
466+ m_fov_map[camera] = fov;
467+ }
464468 }
465469
466470 if (!was_vertical_fov_enabled) {
You can’t perform that action at this time.
0 commit comments