Umm, you had the gun for self defense, but did not intend to shoot at that time. Either version of events, that the kid lunged at him, or that the kid tried to slap the gun away, supports the idea of an accidental discharge.
If you fired accidentally, you are negligent. And therefore guilty.