Skip to content

Commit

Permalink
Oh yea actually remove the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Dec 18, 2020
1 parent f978a9c commit 5939636
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cascadia/Remoting/Monarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,17 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
{
auto peasantSearch = _peasants.find(peasantID);
auto maybeThePeasant = peasantSearch == _peasants.end() ? nullptr : peasantSearch->second;
maybeThePeasant.GetPID();
if (maybeThePeasant)
{
maybeThePeasant.GetPID();
}
return maybeThePeasant;
}
catch (...)
{
LOG_CAUGHT_EXCEPTION();
// TODO: Remove the peasant from the list of peasants

_peasants.erase(peasantID);
return nullptr;
}
}
Expand Down

0 comments on commit 5939636

Please sign in to comment.