3052: Fix virtual call in Constructor r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
bors[bot] 2020-10-10 10:34:41 +00:00 committed by GitHub
commit 80ee8ff823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -17,8 +17,6 @@ CBackground::CBackground(int MapType, bool OnlineOnly) :
m_pBackgroundLayers = m_pLayers;
m_pImages = new CMapImages;
m_pBackgroundImages = m_pImages;
m_pBackgroundMap = CreateBGMap();
m_pMap = m_pBackgroundMap;
m_Loaded = false;
m_aMapName[0] = '\0';
m_LastLoad = 0;
@ -37,6 +35,9 @@ CBackgroundEngineMap *CBackground::CreateBGMap()
void CBackground::OnInit()
{
m_pBackgroundMap = CreateBGMap();
m_pMap = m_pBackgroundMap;
m_pImages->m_pClient = GameClient();
Kernel()->RegisterInterface(m_pBackgroundMap);
if(g_Config.m_ClBackgroundEntities[0] != '\0' && str_comp(g_Config.m_ClBackgroundEntities, CURRENT_MAP))

View file

@ -36,6 +36,9 @@ CBackgroundEngineMap *CMenuBackground::CreateBGMap()
void CMenuBackground::OnInit()
{
m_pBackgroundMap = CreateBGMap();
m_pMap = m_pBackgroundMap;
m_IsInit = true;
m_pImages->m_pClient = GameClient();