aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-07-21 13:40:08 +0000
committerCharles Krinke2008-07-21 13:40:08 +0000
commita432a07005c700222de612f408fe2921d2348825 (patch)
tree40418a48a705124291dfbac48a12c75a30964a4e /OpenSim/Region/Environment/Scenes/InnerScene.cs
parent* eliminated some warnings and added some const and readonlies (diff)
downloadopensim-SC_OLD-a432a07005c700222de612f408fe2921d2348825.zip
opensim-SC_OLD-a432a07005c700222de612f408fe2921d2348825.tar.gz
opensim-SC_OLD-a432a07005c700222de612f408fe2921d2348825.tar.bz2
opensim-SC_OLD-a432a07005c700222de612f408fe2921d2348825.tar.xz
Mantis#1798. Thank you kindly, StrawberryFride for a patch that:
Fixes a couple of places where null reference exceptions were being caught and ignored rather than null checks being performed.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs16
1 files changed, 4 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 57d3e5c..399cbf6 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -95,22 +95,14 @@ namespace OpenSim.Region.Environment.Scenes
95 // If we're not doing the initial set 95 // If we're not doing the initial set
96 // Then we've got to remove the previous 96 // Then we've got to remove the previous
97 // event handler 97 // event handler
98 try 98
99 { 99 if (_PhyScene != null)
100 _PhyScene.OnPhysicsCrash -= physicsBasedCrash; 100 _PhyScene.OnPhysicsCrash -= physicsBasedCrash;
101 }
102 catch (NullReferenceException)
103 {
104 // This occurs when storing to _PhyScene the first time.
105 // Is there a better way to check the event handler before
106 // getting here
107 // This can be safely ignored. We're setting the first inital
108 // there are no event handler's registered.
109 }
110 101
111 _PhyScene = value; 102 _PhyScene = value;
112 103
113 _PhyScene.OnPhysicsCrash += physicsBasedCrash; 104 if (_PhyScene != null)
105 _PhyScene.OnPhysicsCrash += physicsBasedCrash;
114 } 106 }
115 } 107 }
116 108