Fixed bugs #676511,#710239: Segfault when loading game with walls
This commit is contained in:
parent
340e1482b5
commit
2f62b70510
2 changed files with 6 additions and 4 deletions
|
@ -1140,6 +1140,8 @@
|
|||
(from Jimmy Salmon).
|
||||
<LI>Made color cycling configurable via ccl (from Nehal Mistry).
|
||||
<LI>Made wheel mouse work for sliders (from Nehal Mistry).
|
||||
<LI>Fixed bugs #676511,#710239: Segfault when loading game with walls
|
||||
(from Russell Smith).
|
||||
<LI>+++
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
@ -125,7 +125,7 @@ global void MapFixSeenWallTile(int x, int y)
|
|||
|
||||
if (t == TileTypeHumanWall) {
|
||||
tile = TheMap.Tileset->HumanWallTable[tile];
|
||||
if (mf->Value <= UnitTypeHumanWall->_HitPoints / 2) {
|
||||
if (UnitTypeHumanWall && mf->Value <= UnitTypeHumanWall->_HitPoints / 2) {
|
||||
while (TheMap.Tileset->Table[tile]){ // Skip good tiles
|
||||
++tile;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ global void MapFixSeenWallTile(int x, int y)
|
|||
}
|
||||
} else {
|
||||
tile = TheMap.Tileset->OrcWallTable[tile];
|
||||
if (mf->Value <= UnitTypeOrcWall->_HitPoints / 2) {
|
||||
if (UnitTypeOrcWall && mf->Value <= UnitTypeOrcWall->_HitPoints / 2) {
|
||||
while (TheMap.Tileset->Table[tile]) { // Skip good tiles
|
||||
++tile;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ global void MapFixWallTile(int x, int y)
|
|||
|
||||
if (t & MapFieldHuman) {
|
||||
tile = TheMap.Tileset->HumanWallTable[tile];
|
||||
if (mf->Value <= UnitTypeHumanWall->_HitPoints / 2) {
|
||||
if (UnitTypeHumanWall && mf->Value <= UnitTypeHumanWall->_HitPoints / 2) {
|
||||
while (TheMap.Tileset->Table[tile]) { // Skip good tiles
|
||||
++tile;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ global void MapFixWallTile(int x, int y)
|
|||
}
|
||||
} else {
|
||||
tile = TheMap.Tileset->OrcWallTable[tile];
|
||||
if (mf->Value <= UnitTypeOrcWall->_HitPoints / 2) {
|
||||
if (UnitTypeOrcWall && mf->Value <= UnitTypeOrcWall->_HitPoints / 2) {
|
||||
while (TheMap.Tileset->Table[tile]) { // Skip good tiles
|
||||
++tile;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue