Explorar el Código

fix crash when bonus limiter is empty in OwnerUpdater

kdmcser hace 7 meses
padre
commit
a17f59b704
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;
 }