From 8dad2e56f3d87769a47e9b89455274a130267cc9 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 23 Dec 2010 11:42:17 -0700 Subject: fix for SH-416: crash at LLFace::getGeometryVolume line 1003 --- indra/llprimitive/lltextureentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 3c1d031ff5..861bde5c89 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -403,7 +403,7 @@ S32 LLTextureEntry::setOffsetT(F32 t) S32 LLTextureEntry::setRotation(F32 theta) { - if (mRotation != theta) + if (mRotation != theta && llfinite(theta)) { mRotation = theta; return TEM_CHANGE_TEXTURE; -- cgit v1.2.3 From 16443c4df389b5d43bae129ba64d4311f5625ca3 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 11 Mar 2011 15:09:44 -0800 Subject: STORM-1001 : Fix ObjectMedia cap flooding (Fix by Kitty Barnett) --- indra/llprimitive/lltextureentry.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 861bde5c89..34eff17519 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -423,24 +423,10 @@ S32 LLTextureEntry::setBumpShinyFullbright(U8 bump) S32 LLTextureEntry::setMediaTexGen(U8 media) { - if (mMediaFlags != media) - { - mMediaFlags = media; - - // Special code for media handling - if( hasMedia() && mMediaEntry == NULL) - { - mMediaEntry = new LLMediaEntry; - } - else if ( ! hasMedia() && mMediaEntry != NULL) - { - delete mMediaEntry; - mMediaEntry = NULL; - } - - return TEM_CHANGE_MEDIA; - } - return TEM_CHANGE_NONE; + S32 result = TEM_CHANGE_NONE; + result |= setTexGen(media & TEM_TEX_GEN_MASK); + result |= setMediaFlags(media & TEM_MEDIA_MASK); + return result; } S32 LLTextureEntry::setBumpmap(U8 bump) -- cgit v1.2.3 From 2c584790d0505ebff13d29e9f068aefcffe54f01 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 1 Apr 2011 09:14:52 -0400 Subject: VWR-24487 make PREHASH variables char const* const --- indra/llprimitive/llprimitive.cpp | 4 ++-- indra/llprimitive/llprimitive.h | 4 ++-- indra/llprimitive/llvolumemessage.cpp | 6 +++--- indra/llprimitive/llvolumemessage.h | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 258c0c3c15..f9ef897aa3 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1216,12 +1216,12 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const return FALSE; } -S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name) +S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name) { return(unpackTEMessage(mesgsys,block_name,-1)); } -S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, const S32 block_num) +S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num) { // use a negative block_num to indicate a single-block read (a non-variable block) S32 retval = 0; diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index f535fb1672..d981b248fa 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -358,8 +358,8 @@ public: S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type); BOOL packTEMessage(LLMessageSystem *mesgsys) const; BOOL packTEMessage(LLDataPacker &dp) const; - S32 unpackTEMessage(LLMessageSystem *mesgsys, char *block_name); - S32 unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, const S32 block_num); // Variable num of blocks + S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name); + S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks BOOL unpackTEMessage(LLDataPacker &dp); #ifdef CHECK_FOR_FINITE diff --git a/indra/llprimitive/llvolumemessage.cpp b/indra/llprimitive/llvolumemessage.cpp index b6cae5c4df..58b23bebd2 100644 --- a/indra/llprimitive/llvolumemessage.cpp +++ b/indra/llprimitive/llvolumemessage.cpp @@ -94,7 +94,7 @@ bool LLVolumeMessage::packProfileParams( bool LLVolumeMessage::unpackProfileParams( LLProfileParams* params, LLMessageSystem* mesgsys, - char* block_name, + char const* block_name, S32 block_num) { bool ok = true; @@ -322,7 +322,7 @@ bool LLVolumeMessage::packPathParams( bool LLVolumeMessage::unpackPathParams( LLPathParams* params, LLMessageSystem* mesgsys, - char* block_name, + char const* block_name, S32 block_num) { U8 curve; @@ -522,7 +522,7 @@ bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLDataPacke bool LLVolumeMessage::unpackVolumeParams( LLVolumeParams* params, LLMessageSystem* mesgsys, - char* block_name, + char const* block_name, S32 block_num) { bool ok = true; diff --git a/indra/llprimitive/llvolumemessage.h b/indra/llprimitive/llvolumemessage.h index 33562323c3..f59ee79c60 100644 --- a/indra/llprimitive/llvolumemessage.h +++ b/indra/llprimitive/llvolumemessage.h @@ -49,7 +49,7 @@ protected: static bool unpackProfileParams( LLProfileParams* params, LLMessageSystem* mesgsys, - char* block_name, + char const* block_name, S32 block_num = 0); static bool unpackProfileParams(LLProfileParams* params, LLDataPacker& dp); @@ -60,7 +60,7 @@ protected: static bool unpackPathParams( LLPathParams* params, LLMessageSystem* mesgsys, - char* block_name, + char const* block_name, S32 block_num = 0); static bool unpackPathParams(LLPathParams* params, LLDataPacker& dp); @@ -83,7 +83,7 @@ public: static bool unpackVolumeParams( LLVolumeParams* params, LLMessageSystem* mesgsys, - char* block_name, + char const* block_name, S32 block_num = 0); static bool unpackVolumeParams(LLVolumeParams* params, LLDataPacker &dp); }; -- cgit v1.2.3