From acfe936056fd26d3cc7c05089bf33685d02bc3b2 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Tue, 12 Oct 2010 14:05:23 -1000 Subject: [PATCH] i have absolutely no idea why this function gets called on a malformed chunk that was already culled, but whatever --- mclevel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mclevel.py b/mclevel.py index 790901f..d51a414 100644 --- a/mclevel.py +++ b/mclevel.py @@ -2402,7 +2402,8 @@ class MCInfdevOldLevel(MCLevel): def malformedChunk(self, cx, cz): debug( "Forgetting malformed chunk {0} ({1})".format((cx,cz), self.chunkFilename(cx,cz)) ) - del self._presentChunks[(cx,cz)] + if (cx,cz) in self._presentChunks: + del self._presentChunks[(cx,cz)] def createChunk(self, cx, cz): if (cx,cz) in self._presentChunks: raise ValueError, "{0}:Chunk {1} already present!".format(self, (cx,cz) )