Check if the allocated views set for exists for surface on mount

Summary:
Adds a check to verify that we are not trying to insert a new view id into a non-existent set.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D33621031

fbshipit-source-id: 8468af69bea250a70d656789ea819c39b55a9de6
This commit is contained in:
Andrei Shikov 2022-01-17 06:31:00 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 0b48ef7ca8
Коммит ead669524e
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -413,7 +413,8 @@ void FabricMountingManager::executeMount(
} }
} }
if (shouldRememberAllocatedViews_) { if (shouldRememberAllocatedViews_ &&
allocatedViewsIterator != allocatedViewRegistry_.end()) {
auto &views = allocatedViewsIterator->second; auto &views = allocatedViewsIterator->second;
for (auto const &mutation : mutations) { for (auto const &mutation : mutations) {
switch (mutation.type) { switch (mutation.type) {