diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 8829f27..5969d45 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -727,9 +727,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
727 | int ty = min_y * 4; | 727 | int ty = min_y * 4; |
728 | if (ty > ((int)Constants.RegionSize - 1)) | 728 | if (ty > ((int)Constants.RegionSize - 1)) |
729 | ty = ((int)Constants.RegionSize - 1); | 729 | ty = ((int)Constants.RegionSize - 1); |
730 | |||
730 | LandData.AABBMin = | 731 | LandData.AABBMin = |
731 | new Vector3((float) (min_x * 4), (float) (min_y * 4), | 732 | new Vector3( |
732 | (float) m_scene.Heightmap[tx, ty]); | 733 | (float)(min_x * 4), (float)(min_y * 4), m_scene != null ? (float)m_scene.Heightmap[tx, ty] : 0); |
733 | 734 | ||
734 | tx = max_x * 4; | 735 | tx = max_x * 4; |
735 | if (tx > ((int)Constants.RegionSize - 1)) | 736 | if (tx > ((int)Constants.RegionSize - 1)) |
@@ -737,9 +738,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
737 | ty = max_y * 4; | 738 | ty = max_y * 4; |
738 | if (ty > ((int)Constants.RegionSize - 1)) | 739 | if (ty > ((int)Constants.RegionSize - 1)) |
739 | ty = ((int)Constants.RegionSize - 1); | 740 | ty = ((int)Constants.RegionSize - 1); |
740 | LandData.AABBMax = | 741 | |
741 | new Vector3((float) (max_x * 4), (float) (max_y * 4), | 742 | LandData.AABBMax |
742 | (float) m_scene.Heightmap[tx, ty]); | 743 | = new Vector3( |
744 | (float)(max_x * 4), (float)(max_y * 4), m_scene != null ? (float)m_scene.Heightmap[tx, ty] : 0); | ||
745 | |||
743 | LandData.Area = tempArea; | 746 | LandData.Area = tempArea; |
744 | } | 747 | } |
745 | 748 | ||