From 9f6e052ac02007773026b93684d0f25af120ee14 Mon Sep 17 00:00:00 2001 From: Mark Schreiber Date: Fri, 14 Jun 2019 19:08:40 -0700 Subject: [PATCH] Fix UPS guns for multiple ammotype support Recent support for multiple ammotypes broke UPS guns, as they have no ammotype. Fix. --- src/veh_type.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/veh_type.cpp b/src/veh_type.cpp index 29bdd288891c2..ef39a713dbc83 100644 --- a/src/veh_type.cpp +++ b/src/veh_type.cpp @@ -1061,7 +1061,9 @@ void vehicle_prototype::finalize() } } if( pt.ammo_types.empty() ) { - pt.ammo_types.insert( ammotype( *base->gun->ammo.begin() )->default_ammotype() ); + if( !base->gun->ammo.empty() ){ + pt.ammo_types.insert( ammotype( *base->gun->ammo.begin() )->default_ammotype() ); + } } }