more double checked locking

This commit is contained in:
Mark Sturgill 2013-10-17 20:29:23 -07:00
parent fe1f40f927
commit 3655814e4a

View file

@ -939,9 +939,10 @@ namespace Server
{ {
get get
{ {
lock (tileLock) if (m_Tiles == null)
if ( m_Tiles == null ) lock (tileLock)
m_Tiles = new TileMatrix( this, m_FileIndex, m_MapID, m_Width, m_Height ); if (m_Tiles == null)
m_Tiles = new TileMatrix(this, m_FileIndex, m_MapID, m_Width, m_Height);
return m_Tiles; return m_Tiles;
} }