diff --git a/src/weapon.c b/src/weapon.c index 19c5c8a..384272d 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -406,7 +406,8 @@ static Weapon* weapon_create(const Outfit* outfit, const double dir, const Vec2* case OUTFIT_TYPE_BOLT: case OUTFIT_TYPE_TURRET_BOLT: /* Only difference is the direction of fire. */ - if((outfit->type == OUTFIT_TYPE_TURRET_BOLT) && (w->parent != w->target)) { + if((outfit->type == OUTFIT_TYPE_TURRET_BOLT) && (w->parent != w->target) && + (w->target != 0)) { /* Must have a valid target. */ rdir = vect_angle(pos, &pilot_get(w->target)->solid->pos); rdir += RNG(-outfit->u.blt.accuracy/2., outfit->u.blt.accuracy/2.)/180.*M_PI;