Stokes 'could have killed' man, court told