Access Violation With my edited code

When the gun’s projectile hits a wall this happens and the engine crashes

Access violation - code c0000005 (first/second chance not available)

UE4Editor_ShooterGame_8199!AShooterProjectile::Explode() [d:\program files\stuff\unreal\unrealgame\source\shootergame\private\weapons\shooterprojectile.cpp:113]
UE4Editor_ShooterGame_8199!AShooterProjectile::OnImpact() [d:\program files\stuff\unreal\unrealgame\source\shootergame\private\weapons\shooterprojectile.cpp:73]
UE4Editor_ShooterGame_8199!AShooterProjectile::execOnImpact()

Line 106 - 126 (New Code)

		if (WeaponConfig.ExplosionDamage > 0 && WeaponConfig.ExplosionRadius > 0 && WeaponConfig.DamageType)
		{
			//FPointDamageEvent PointDmg;
			//PointDmg.DamageTypeClass = WeaponConfig.DamageType;
			//PointDmg.HitInfo = Impact;
			//PointDmg.Damage = WeaponConfig.ExplosionDamage;

			//Impact.GetActor()->TakeDamage(PointDmg.Damage, PointDmg, MyController.Get(), this);
			UGameplayStatics::ApplyDamage(Impact.GetActor(), WeaponConfig.ExplosionDamage, MyController.Get(), this, WeaponConfig.DamageType);
		}

		if (ImpactTemplate)
		{
			FTransform const SpawnTransform(Impact.ImpactNormal.Rotation(), Impact.ImpactPoint);
			AShooterImpactEffect* EffectActor = GetWorld()->SpawnActorDeferred<AShooterImpactEffect>(ImpactTemplate, SpawnTransform);
			if (EffectActor)
			{
				EffectActor->SurfaceHit = Impact;
				UGameplayStatics::FinishSpawningActor(EffectActor, SpawnTransform);
			}
		}

Line 68 - 75 (I Haven’t edited)

void AShooterProjectile::OnImpact(const FHitResult& HitResult)
{
	if (Role == ROLE_Authority && !bExploded)
	{
		Explode(HitResult);
		DisableAndDestroy();
	}
}

look at line 113 you got a nullptr there somewhere on the parameters, check them before you pass them along:

UGameplayStatics::ApplyDamage(Impact.GetActor(), WeaponConfig.ExplosionDamage, MyController.Get(), this, WeaponConfig.DamageType);