Permalink
Browse files

Merge pull request #393 from Jarskih/fixAutocannon

Fix when entering battle with empty autocannon #383
  • Loading branch information...
JonnyH committed Oct 11, 2018
2 parents e07568c + 19527ef commit 8cd7a0dbbc252ff304e921669392be6e8e619abc
Showing with 2 additions and 2 deletions.
  1. +2 −2 game/state/battle/battle.cpp
@@ -3531,7 +3531,7 @@ void Battle::loadImagePacks(GameState &state)
if (imagePacks.find(packName) == imagePacks.end())
imagePacks.insert(packName);
}
if (!brainsuckerFound && ae->getPayloadType()->damage_type &&
if (!brainsuckerFound && ae->getPayloadType() && ae->getPayloadType()->damage_type &&
ae->getPayloadType()->damage_type->effectType ==
DamageType::EffectType::Brainsucker)
{
@@ -3647,7 +3647,7 @@ void Battle::loadAnimationPacks(GameState &state)
{
for (auto &e : u.second->agent->equipment)
{
if (e->getPayloadType()->damage_type &&
if (e->getPayloadType() && e->getPayloadType()->damage_type &&
e->getPayloadType()->damage_type->effectType ==
DamageType::EffectType::Brainsucker)
{

0 comments on commit 8cd7a0d

Please sign in to comment.