Skip to content

Commit

Permalink
xrGame/ui/UIRankingWnd.cpp: fix a crash when try to update the rankin…
Browse files Browse the repository at this point in the history
…g tab when the pda is closed
  • Loading branch information
ChugunovRoman committed Sep 15, 2024
1 parent 3d00030 commit f538f61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIPdaWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void CUIPdaWnd::UpdatePda()

void CUIPdaWnd::UpdateRankingWnd()
{
if (pUIRankingWnd)
if (pUIRankingWnd && pUIRankingWnd->IsShown())
pUIRankingWnd->Update();
}

Expand Down
3 changes: 2 additions & 1 deletion src/xrGame/ui/UIRankingWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ void CUIRankingWnd::Show(bool status)

void CUIRankingWnd::Update()
{
inherited::Update();
if (inherited::IsShown())
inherited::Update();
if (Device.dwTimeGlobal - m_previous_time > m_delay)
{
m_previous_time = Device.dwTimeGlobal;
Expand Down

0 comments on commit f538f61

Please sign in to comment.