From fe9f4d477772d68eb06c9b31b9553cba67124606 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 12 Jul 2016 15:06:28 +0200 Subject: Added asserts to investigate a potential segfault. --- src/game/base/ship.cc | 2 ++ 1 file changed, 2 insertions(+) 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()) { -- cgit v1.2.3