Officer hurt in accidental shooting