mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Use bonus only as shared_ptr to avoid memory corruption
This commit is contained in:
@ -269,7 +269,7 @@ void BoatInstanceConstructor::initializeObject(CGBoat * boat) const
|
||||
boat->onboardAssaultAllowed = onboardAssaultAllowed;
|
||||
boat->onboardVisitAllowed = onboardVisitAllowed;
|
||||
for(auto & b : bonuses)
|
||||
boat->addNewBonus(std::make_shared<Bonus>(b));
|
||||
boat->addNewBonus(b);
|
||||
}
|
||||
|
||||
AnimationPath BoatInstanceConstructor::getBoatAnimationName() const
|
||||
|
Reference in New Issue
Block a user