[-] Fixed crash with construction shadows.

This commit is contained in:
cybermind 2015-02-12 16:23:15 +05:00
parent 2e91d391f3
commit 3b0cb65893

View file

@ -848,7 +848,7 @@ void CUnit::Draw(const CViewport &vp) const
}
if (state == 1 && constructed) {
if (state == 1 && constructed && cframe) {
DrawConstructionShadow(*type, cframe, frame, screenPos);
} else {
if (action != UnitActionDie) {
@ -883,7 +883,7 @@ void CUnit::Draw(const CViewport &vp) const
// Buildings under construction/upgrade/ready.
//
if (state == 1) {
if (constructed) {
if (constructed && cframe) {
const PixelPos pos(screenPos + (type->GetPixelSize()) / 2);
DrawConstruction(player, cframe, *type, frame, pos);
} else {