Fixed bug : Crash building oil platofrm with UNITS_ON_MAP

This commit is contained in:
jsalmon3 2003-02-20 21:01:48 +00:00
parent 7bce410397
commit 5e9a97cd20
2 changed files with 9 additions and 7 deletions

View file

@ -1079,6 +1079,8 @@
<LI>Added middle-click pasting support in X11 (from Juan Pablo).
<LI>Fixed bug when destroying a unit with another unit inside it (from
Jimmy Salmon).
<LI>Fixed bug #690171: Crash building oil platform with UNITS_ON_MAP
(from Jimmy Salmon).
<LI>+++
</UL>
</UL>

View file

@ -558,13 +558,6 @@ global void PlaceUnit(Unit* unit,int x,int y)
}
}
unit->Removed=0;
UnitCacheInsert(unit);
MustRedraw|=RedrawMinimap;
CheckUnitToBeDrawn(unit);
UnitMarkSeen(unit);
//
// Building oil-platform, must remove oil-patch.
//
@ -580,6 +573,13 @@ global void PlaceUnit(Unit* unit,int x,int y)
DebugLevel0Fn("No oil-patch to remove.\n");
}
}
unit->Removed=0;
UnitCacheInsert(unit);
MustRedraw|=RedrawMinimap;
CheckUnitToBeDrawn(unit);
UnitMarkSeen(unit);
}
/**