Fixed null pointer dereference...

...when redrawing a unit without any standing animation. 

(Fix for bug #15787.)
This commit is contained in:
Guillaume Melquiond 2010-04-16 06:56:51 +00:00
parent 8966ad6b9c
commit ab82611f26

View file

@ -1757,15 +1757,15 @@ void unit::redraw_unit()
}
return;
}
if(refreshing_) {
return;
if (!anim_) {
set_standing();
if (!anim_) return;
}
if (refreshing_) return;
refreshing_ = true;
if(!anim_) {
set_standing();
}
anim_->update_last_draw_time();
frame_parameters params;
const t_translation::t_terrain terrain = map.get_terrain(loc_);