fixed a seg fault on add weapon

This commit is contained in:
bMorgan01 2021-04-27 16:41:31 -06:00
parent 065d543d4d
commit d1a7053149
3 changed files with 123 additions and 157 deletions

View file

@ -105,8 +105,5 @@ void Ship::setTarget(Ship *_target) {
}
void Ship::addWeapon(Weapon *w) {
Weapon *copiedWeapon;
*copiedWeapon = *w;
weapons.push_back(copiedWeapon);
weapons.push_back(w);
}