[Orxonox-commit 2363] r7078 - code/branches/presentation3/src/orxonox/weaponsystem
landauf at orxonox.net
landauf at orxonox.net
Wed Jun 2 01:53:41 CEST 2010
Author: landauf
Date: 2010-06-02 01:53:41 +0200 (Wed, 02 Jun 2010)
New Revision: 7078
Modified:
code/branches/presentation3/src/orxonox/weaponsystem/WeaponSystem.cc
Log:
fixed a bug in WeaponSystem which lead to a crash in combination with the new FPS player
Modified: code/branches/presentation3/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- code/branches/presentation3/src/orxonox/weaponsystem/WeaponSystem.cc 2010-06-01 23:52:21 UTC (rev 7077)
+++ code/branches/presentation3/src/orxonox/weaponsystem/WeaponSystem.cc 2010-06-01 23:53:41 UTC (rev 7078)
@@ -213,7 +213,8 @@
unsigned int i = 0;
Weapon* weapon = 0;
while ((weapon = wPack->getWeapon(i++)))
- weapon->getWeaponSlot()->removeWeapon();
+ if (weapon->getWeaponSlot())
+ weapon->getWeaponSlot()->removeWeapon();
// Remove all added links from the WeaponSets
for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
More information about the Orxonox-commit
mailing list