summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorNicky <none@none>2012-07-10 20:12:31 +0200
committerNicky <none@none>2012-07-10 20:12:31 +0200
commit8902f4c6c0fed60ae6d8b7596e61c7b8387079c1 (patch)
treee3c54a7513f7e2392fa3dc2571f8f2ff0de7d61f /indra/newview/llvoavatar.cpp
parent2005b4fed4dcfc17ec46d21ce093dbc6a368083b (diff)
Crashfix: Don't blindly trust getImage() returns a valid pointer.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 2c1291c954..39222c25fd 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8707,6 +8707,12 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index
return FALSE;
}
+ if( !getImage( te, index ) )
+ {
+ llwarns << "getImage( " << te << ", " << index << " ) returned 0" << llendl;
+ return FALSE;
+ }
+
return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR &&
getImage(te, index)->getID() != IMG_DEFAULT);
}