diff options
author | Nicky <none@none> | 2012-07-10 20:12:31 +0200 |
---|---|---|
committer | Nicky <none@none> | 2012-07-10 20:12:31 +0200 |
commit | 8902f4c6c0fed60ae6d8b7596e61c7b8387079c1 (patch) | |
tree | e3c54a7513f7e2392fa3dc2571f8f2ff0de7d61f /indra/newview/llvoavatar.cpp | |
parent | 2005b4fed4dcfc17ec46d21ce093dbc6a368083b (diff) |
Crashfix: Don't blindly trust getImage() returns a valid pointer.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 6 |
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); } |