Skip to content

Commit

Permalink
[clang-analyzer] Ad missing nullptr check
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Jul 7, 2015
1 parent ee2ec28 commit af1bad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/animation/Animation.cpp
Expand Up @@ -699,7 +699,7 @@ void PrepareAnim(ANIM_USE *eanim, unsigned long time, Entity *io) {
&& (eanim->cur_anim->anims[eanim->altidx_cur]->frames[fr].flag > 0)
&& (eanim->lastframe != fr)) {

if(io != entities.player()) {
if(io && io != entities.player()) {
if(eanim->lastframe < fr && eanim->lastframe != -1) {
for(long n = eanim->lastframe + 1; n <= fr; n++) {
if(eanim->cur_anim->anims[eanim->altidx_cur]->frames[n].flag == 9)
Expand Down

0 comments on commit af1bad6

Please sign in to comment.