mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
fix crash when bonus limiter is empty in OwnerUpdater
This commit is contained in:
@ -229,7 +229,8 @@ std::shared_ptr<Bonus> OwnerUpdater::createUpdatedBonus(const std::shared_ptr<Bo
|
||||
std::shared_ptr<Bonus> updated =
|
||||
std::make_shared<Bonus>(*b);
|
||||
updated->limiter = b->limiter;
|
||||
updated->limiter->acceptUpdater(*this);
|
||||
if (updated->limiter)
|
||||
updated->limiter->acceptUpdater(*this);
|
||||
return updated;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user