for case with no buffer, check lower bounds

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1437 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-09-13 05:28:53 +00:00
parent c8e7d93f95
commit 6793507a34

View File

@@ -267,8 +267,8 @@ OpenLayers.Layer.Grid.prototype =
// if the test grid coordinates are within the bounds of the
// grid, get a reference to the tile.
var tile = null;
if ((testRow < this.grid.length) &&
(testCell < this.grid[0].length)) {
if ((testRow < this.grid.length) && (testRow >= 0) &&
(testCell < this.grid[0].length) && (testCell >= 0)) {
tile = this.grid[testRow][testCell];
}