diff options
author | Stijn Buys <ingar@osirion.org> | 2016-07-12 15:06:28 +0200 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2016-07-12 15:06:28 +0200 |
commit | fe9f4d477772d68eb06c9b31b9553cba67124606 (patch) | |
tree | e20a428fb7c13d0752b98802a02f073abf48445b | |
parent | f2d0bd7a9d98d2dca9226afe1dbe5d1340059680 (diff) |
Added asserts to investigate a potential segfault.
-rw-r--r-- | src/game/base/ship.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index b1e0574..78e6973 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -445,6 +445,7 @@ void Ship::explode() } if (percentage > 0) { + assert(inventory()); core::Inventory::Items::iterator it = inventory()->items().begin(); while (it != inventory()->items().end()) { if ((*it)->info()->type() == Cargo::infotype()) { @@ -460,6 +461,7 @@ void Ship::explode() } if (!owner()) { + assert(inventory()); core::Inventory::Items::iterator it = inventory()->items().begin(); while (it != inventory()->items().end()) { if ((*it)->info()->type() == Weapon::infotype()) { |