mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +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::shared_ptr<Bonus> updated =
|
||||||
std::make_shared<Bonus>(*b);
|
std::make_shared<Bonus>(*b);
|
||||||
updated->limiter = b->limiter;
|
updated->limiter = b->limiter;
|
||||||
updated->limiter->acceptUpdater(*this);
|
if (updated->limiter)
|
||||||
|
updated->limiter->acceptUpdater(*this);
|
||||||
return updated;
|
return updated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user