Index: binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs	(revision 135)
+++ binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs	(revision 136)
@@ -21,5 +21,5 @@
 
 		private RegionFileManager rfm;
-		private Texture2D fullMapTexture;
+		private Texture2D fullMapTexture = null;
 		private MapRenderBlockBuffer[] zoomLevelBuffers = new MapRenderBlockBuffer[Constants.ZOOMLEVELS];
 		private Color[] chunkColors = new Color[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
@@ -79,7 +79,9 @@
 			                        minPos.ToString (), maxPos.ToString (),
 			                        widthChunks, heightChunks,
-			                        widthPix, heightPix));
-
-			fullMapTexture = new Texture2D (widthPix, heightPix);
+			                        widthPix, heightPix)
+			);
+
+			if (widthPix <= 8000 && heightPix <= 8000)
+				fullMapTexture = new Texture2D (widthPix, heightPix);
 
 			Vector2i curFullMapPos;
@@ -98,7 +100,10 @@
 			rfm = null;
 
-			byte[] array = fullMapTexture.EncodeToPNG ();
-			File.WriteAllBytes (Constants.MAP_DIRECTORY + "/map.png", array);
-			Texture2D.Destroy (fullMapTexture);
+			if (fullMapTexture != null) {
+				byte[] array = fullMapTexture.EncodeToPNG ();
+				File.WriteAllBytes (Constants.MAP_DIRECTORY + "/map.png", array);
+				Texture2D.Destroy (fullMapTexture);
+				fullMapTexture = null;
+			}
 
 			renderingFullMap = false;
@@ -149,5 +154,5 @@
 					zoomLevelBuffers [Constants.ZOOMLEVELS - 1].SetPart (blockOffset, Constants.MAP_CHUNK_SIZE, chunkColors);
 
-					if (renderingFullMap)
+					if (renderingFullMap && fullMapTexture != null)
 						fullMapTexture.SetPixels (fullMapPos.x, fullMapPos.y, Constants.MAP_CHUNK_SIZE, Constants.MAP_CHUNK_SIZE, chunkColors);
 
