diff --git a/2.5DHero/2.5DHero/Resources/TextureManager.vb b/2.5DHero/2.5DHero/Resources/TextureManager.vb index 7f380fcb5..5064ed460 100644 --- a/2.5DHero/2.5DHero/Resources/TextureManager.vb +++ b/2.5DHero/2.5DHero/Resources/TextureManager.vb @@ -130,8 +130,8 @@ Public Class TextureManager End Function Public Shared Function GetTexture(ByVal Texture As Texture2D, ByVal Rectangle As Rectangle, Optional ByVal Factor As Integer = 1) As Texture2D - Dim tex As Texture2D - + Dim tex As Texture2D = Nothing + If TextureRectList.TryGetValue(New KeyValuePair(Of Int32, Rectangle)(Texture.GetHashCode(), Rectangle), tex) then Return tex End If