diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lightshare.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/linden/indra/newview/lightshare.cpp b/linden/indra/newview/lightshare.cpp index 4f8b1e2..b00df96 100644 --- a/linden/indra/newview/lightshare.cpp +++ b/linden/indra/newview/lightshare.cpp | |||
@@ -63,8 +63,7 @@ WindlightMessage::WindlightMessage( LLMessageSystem* msg ) : | |||
63 | return; // Wrong message type, somehow. | 63 | return; // Wrong message type, somehow. |
64 | } | 64 | } |
65 | 65 | ||
66 | S32 size = msg->getSizeFast(_PREHASH_ParamList, 0, | 66 | S32 size = msg->getSizeFast(_PREHASH_ParamList, 0, _PREHASH_Parameter); |
67 | _PREHASH_Parameter); | ||
68 | 67 | ||
69 | if( size < 0 || 250 < size ) | 68 | if( size < 0 || 250 < size ) |
70 | { | 69 | { |
@@ -74,8 +73,8 @@ WindlightMessage::WindlightMessage( LLMessageSystem* msg ) : | |||
74 | // Unpack and process the message's binary payload. | 73 | // Unpack and process the message's binary payload. |
75 | char buf[250]; | 74 | char buf[250]; |
76 | msg->getBinaryDataFast(_PREHASH_ParamList, | 75 | msg->getBinaryDataFast(_PREHASH_ParamList, |
77 | _PREHASH_Parameter, | 76 | _PREHASH_Parameter, |
78 | buf, size, 0, 249); | 77 | buf, size, 0, 249); |
79 | 78 | ||
80 | mWater = new LLWaterParamSet(); | 79 | mWater = new LLWaterParamSet(); |
81 | // mSky = new LLWLParamSet(); | 80 | // mSky = new LLWLParamSet(); |
@@ -110,9 +109,15 @@ void WindlightMessage::processWindlight(LLMessageSystem* msg, void**) | |||
110 | 109 | ||
111 | WindlightMessage* wl = new WindlightMessage(msg); | 110 | WindlightMessage* wl = new WindlightMessage(msg); |
112 | 111 | ||
113 | if( !wl->isValid() ) | 112 | if (!wl) |
114 | return; | 113 | return; |
115 | 114 | ||
115 | if(!wl->isValid() ) | ||
116 | { | ||
117 | delete wl; | ||
118 | return; | ||
119 | } | ||
120 | |||
116 | std::string water = LLWaterParamManager::instance()->mCurParams.mName; | 121 | std::string water = LLWaterParamManager::instance()->mCurParams.mName; |
117 | std::string sky = LLWLParamManager::instance()->mCurParams.mName; | 122 | std::string sky = LLWLParamManager::instance()->mCurParams.mName; |
118 | 123 | ||