diff options
author | Armin Weatherwax | 2010-08-27 15:30:58 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-17 11:59:28 +0200 |
commit | 32834c0b1cb9e408e31ff16cc5f6d6bedd62f78a (patch) | |
tree | 5a76b9957f1af5eee924aec67d800540f2ac1d73 /linden/indra | |
parent | Bumped version to 1.3.0 RC3. (diff) | |
download | meta-impy-32834c0b1cb9e408e31ff16cc5f6d6bedd62f78a.zip meta-impy-32834c0b1cb9e408e31ff16cc5f6d6bedd62f78a.tar.gz meta-impy-32834c0b1cb9e408e31ff16cc5f6d6bedd62f78a.tar.bz2 meta-impy-32834c0b1cb9e408e31ff16cc5f6d6bedd62f78a.tar.xz |
fix possible crash caused by hudmanager
thanks to nemurimasu for the catch
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llhudeffectlookat.cpp | 10 | ||||
-rw-r--r-- | linden/indra/newview/llhudmanager.cpp | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index 561fce5..58d2c6a 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp | |||
@@ -280,17 +280,17 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys) | |||
280 | LLViewerObject* source_object = (LLViewerObject*)mSourceObject; | 280 | LLViewerObject* source_object = (LLViewerObject*)mSourceObject; |
281 | LLVOAvatar* source_avatar = NULL; | 281 | LLVOAvatar* source_avatar = NULL; |
282 | 282 | ||
283 | if (!source_object) | 283 | if (!source_object)//imprudence TODO: find out why this happens at all and fix there |
284 | { | 284 | { |
285 | LL_DEBUGS("HUDEffect")<<"NULL-Object HUDEffectLookAt message" << LL_ENDL; | ||
285 | markDead(); | 286 | markDead(); |
286 | return; | 287 | return; |
287 | } | 288 | } |
288 | if (source_object->isAvatar()) //strange enough that non-objects try | 289 | if (source_object->isAvatar()) |
289 | //to send a lookat message ... | ||
290 | { | 290 | { |
291 | source_avatar = (LLVOAvatar*)source_object; | 291 | source_avatar = (LLVOAvatar*)source_object; |
292 | } | 292 | } |
293 | else //... more strange if its an non-avatar object ... | 293 | else //imprudence TODO: find out why this happens at all and fix there |
294 | { | 294 | { |
295 | LL_DEBUGS("HUDEffect")<<"Non-Avatar HUDEffectLookAt message for ID: " << source_object->getID().asString()<< LL_ENDL; | 295 | LL_DEBUGS("HUDEffect")<<"Non-Avatar HUDEffectLookAt message for ID: " << source_object->getID().asString()<< LL_ENDL; |
296 | markDead(); | 296 | markDead(); |
@@ -300,7 +300,7 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys) | |||
300 | 300 | ||
301 | bool is_self = source_avatar->isSelf(); | 301 | bool is_self = source_avatar->isSelf(); |
302 | bool is_private = gSavedSettings.getBOOL("PrivateLookAtTarget"); | 302 | bool is_private = gSavedSettings.getBOOL("PrivateLookAtTarget"); |
303 | if (!is_self) //... very strange if it is not self. But happens. Also at local opensim. | 303 | if (!is_self) //imprudence TODO: find out why this happens at all and fix there |
304 | { | 304 | { |
305 | LL_DEBUGS("HUDEffect")<< "Non-self Avatar HUDEffectLookAt message for ID: " << source_avatar->getID().asString() << LL_ENDL; | 305 | LL_DEBUGS("HUDEffect")<< "Non-self Avatar HUDEffectLookAt message for ID: " << source_avatar->getID().asString() << LL_ENDL; |
306 | markDead(); | 306 | markDead(); |
diff --git a/linden/indra/newview/llhudmanager.cpp b/linden/indra/newview/llhudmanager.cpp index 955d786..602ef6c 100644 --- a/linden/indra/newview/llhudmanager.cpp +++ b/linden/indra/newview/llhudmanager.cpp | |||
@@ -103,7 +103,8 @@ void LLHUDManager::sendEffects() | |||
103 | msg->nextBlockFast(_PREHASH_Effect); | 103 | msg->nextBlockFast(_PREHASH_Effect); |
104 | hep->packData(msg); | 104 | hep->packData(msg); |
105 | hep->setNeedsSendToSim(FALSE); | 105 | hep->setNeedsSendToSim(FALSE); |
106 | gAgent.sendMessage(); | 106 | if (!hep->isDead()) //packData(msg) might have invalidated the effect |
107 | gAgent.sendMessage(); | ||
107 | } | 108 | } |
108 | } | 109 | } |
109 | } | 110 | } |