Skip to content

Commit 5178cf1

Browse files
committed
fix crash
1 parent 423dc38 commit 5178cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ranged.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ static projectile make_gun_projectile( const item &gun )
22582258
proj.range = gun.gun_range();
22592259
proj.proj_effects = gun.ammo_effects();
22602260

2261-
if( gun.ammo_data()->phase == phase_id::LIQUID ) {
2261+
if( gun.has_ammo_data() && gun.ammo_data()->phase == phase_id::LIQUID ) {
22622262
proj.proj_effects.insert( ammo_effect_LIQUID );
22632263
}
22642264

0 commit comments

Comments
 (0)