Skip to content

Commit

Permalink
xrGame/MainMenu.cpp: use if-init statement in Show_DownloadMPMap
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Feb 3, 2023
1 parent 8eb28ae commit d19b743
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/xrGame/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,13 +936,12 @@ void CMainMenu::Show_DownloadMPMap(LPCSTR text, LPCSTR url)
{
m_downloaded_mp_map_url._set(url);

CUIMessageBoxEx* downloadMsg = m_pMB_ErrDlgs[DownloadMPMap];
if (downloadMsg)
if (CUIMessageBoxEx* downloadMsg = m_pMB_ErrDlgs[DownloadMPMap])
{
m_pMB_ErrDlgs[DownloadMPMap]->SetText(text);
m_pMB_ErrDlgs[DownloadMPMap]->SetTextEditURL(url);
downloadMsg->SetText(text);
downloadMsg->SetTextEditURL(url);

m_pMB_ErrDlgs[DownloadMPMap]->ShowDialog(false);
downloadMsg->ShowDialog(false);
}
else
{
Expand Down

0 comments on commit d19b743

Please sign in to comment.