Browse Source

fix crash when bonus limiter is empty in OwnerUpdater

kdmcser 6 months ago
parent
commit
a17f59b704
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/bonuses/Updaters.cpp

+ 2 - 1
lib/bonuses/Updaters.cpp

@@ -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;
 }