diff options
author | Dalien Talbot | 2007-11-11 22:19:33 +0000 |
---|---|---|
committer | Dalien Talbot | 2007-11-11 22:19:33 +0000 |
commit | aeb7b8cc18bf14664e1a08739fe7527fed09f11a (patch) | |
tree | 8458242426571151b37058e74da1edb9887536f4 /OpenSim | |
parent | set svn:eol-style (diff) | |
download | opensim-SC_OLD-aeb7b8cc18bf14664e1a08739fe7527fed09f11a.zip opensim-SC_OLD-aeb7b8cc18bf14664e1a08739fe7527fed09f11a.tar.gz opensim-SC_OLD-aeb7b8cc18bf14664e1a08739fe7527fed09f11a.tar.bz2 opensim-SC_OLD-aeb7b8cc18bf14664e1a08739fe7527fed09f11a.tar.xz |
Fixing null pointer exception from Mathias Soeken:
e.Scene is copied to locale variable scene and replaced when it is null,
but in the LLVector3 constructor in the next line, e.Scene is used, so
it can be null.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ChatModule.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 52491ed..f12612e 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules | |||
124 | // Filled in since it's easier than rewriting right now. | 124 | // Filled in since it's easier than rewriting right now. |
125 | LLVector3 fromPos = e.Position; | 125 | LLVector3 fromPos = e.Position; |
126 | LLVector3 fromRegionPos = e.Position + | 126 | LLVector3 fromRegionPos = e.Position + |
127 | new LLVector3(e.Scene.RegionInfo.RegionLocX*256, e.Scene.RegionInfo.RegionLocY*256, | 127 | new LLVector3(scene.RegionInfo.RegionLocX*256, scene.RegionInfo.RegionLocY*256, |
128 | 0); | 128 | 0); |
129 | string fromName = e.From; | 129 | string fromName = e.From; |
130 | string message = e.Message; | 130 | string message = e.Message; |
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules | |||
140 | { | 140 | { |
141 | fromPos = avatar.AbsolutePosition; | 141 | fromPos = avatar.AbsolutePosition; |
142 | fromRegionPos = fromPos + | 142 | fromRegionPos = fromPos + |
143 | new LLVector3(e.Scene.RegionInfo.RegionLocX*256, e.Scene.RegionInfo.RegionLocY*256, 0); | 143 | new LLVector3(scene.RegionInfo.RegionLocX*256, scene.RegionInfo.RegionLocY*256, 0); |
144 | fromName = avatar.Firstname + " " + avatar.Lastname; | 144 | fromName = avatar.Firstname + " " + avatar.Lastname; |
145 | fromAgentID = e.Sender.AgentId; | 145 | fromAgentID = e.Sender.AgentId; |
146 | avatar = null; | 146 | avatar = null; |