From 3655814e4a07d6aa6ef5889b02df3c21fd7a49da Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Thu, 17 Oct 2013 20:29:23 -0700 Subject: [PATCH] more double checked locking --- Server/Map.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Server/Map.cs b/Server/Map.cs index b8837713e..fdf376278 100644 --- a/Server/Map.cs +++ b/Server/Map.cs @@ -939,9 +939,10 @@ namespace Server { get { - lock (tileLock) - if ( m_Tiles == null ) - m_Tiles = new TileMatrix( this, m_FileIndex, m_MapID, m_Width, m_Height ); + if (m_Tiles == null) + lock (tileLock) + if (m_Tiles == null) + m_Tiles = new TileMatrix(this, m_FileIndex, m_MapID, m_Width, m_Height); return m_Tiles; }