Skip to content

Commit

Permalink
Merge pull request #4552 from erikmaarten/fix-imagery-layer-crash
Browse files Browse the repository at this point in the history
Fixes #4377
  • Loading branch information
mramato authored Nov 1, 2016
2 parents d60dfce + 6e4b282 commit 957d25b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Scene/ImageryLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,10 @@ define([
imageryRectangle = imageryTileXYToRectangle(i, northwestTileCoordinates.y, imageryLevel);
clippedImageryRectangle = Rectangle.simpleIntersection(imageryRectangle, imageryBounds, clippedRectangleScratch);

if (!defined(clippedImageryRectangle)) {
continue;
}

maxU = Math.min(1.0, (clippedImageryRectangle.east - terrainRectangle.west) / terrainRectangle.width);

// If this is the eastern-most imagery tile mapped to this terrain tile,
Expand All @@ -584,6 +588,11 @@ define([

imageryRectangle = imageryTileXYToRectangle(i, j, imageryLevel);
clippedImageryRectangle = Rectangle.simpleIntersection(imageryRectangle, imageryBounds, clippedRectangleScratch);

if (!defined(clippedImageryRectangle)) {
continue;
}

minV = Math.max(0.0, (clippedImageryRectangle.south - terrainRectangle.south) / terrainRectangle.height);

// If this is the southern-most imagery tile mapped to this terrain tile,
Expand Down

0 comments on commit 957d25b

Please sign in to comment.