[Orxonox-commit 1447] r6165 - code/branches/presentation2/src/orxonox/weaponsystem
landauf at orxonox.net
landauf at orxonox.net
Thu Nov 26 18:06:26 CET 2009
Author: landauf
Date: 2009-11-26 18:06:26 +0100 (Thu, 26 Nov 2009)
New Revision: 6165
Modified:
code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
Log:
"Fixed" 'Can't assign NULL identifier' error message and replaced it with a more meaningful message. Please add a munition-name in Rocket.cc soon.
Modified: code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc 2009-11-26 16:31:16 UTC (rev 6164)
+++ code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc 2009-11-26 17:06:26 UTC (rev 6165)
@@ -149,7 +149,11 @@
void WeaponMode::setMunitionName(const std::string& munitionname)
{
this->munitionname_ = munitionname;
- this->munitiontype_ = ClassByString(this->munitionname_);
+ Identifier* identifier = ClassByString(this->munitionname_);
+ if (identifier)
+ this->munitiontype_ = identifier;
+ else
+ COUT(2) << "Warning: No munition class defined in WeaponMode " << this->getName() << std::endl;
this->updateMunition();
}
More information about the Orxonox-commit
mailing list