Fixed null error when switching to partner's history

This commit is contained in:
amevarashi 2023-12-10 15:47:57 +05:00
parent b99b74e27b
commit e9f047b9af
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ namespace RJWSexperience.SexHistory.UI
{
Find.Selector.ClearSelection();
_context = new SexStatusViewModel(history, orderMode);
_context.Update();
if (!_context.Pawn.DestroyedOrNull() && Find.CurrentMap == _context.Pawn.Map)
{
Find.Selector.Select(_context.Pawn);