Lucky he didn't kill a kid.
i´m guessing he had a partner in the room who just handed him his/her pistol ..
correct procedure as i was tought would be for the person handing him the weapon to "Unload" the weapon, pull back the working parts & show
HIM it is clear, no magazine fitted & no round in the chamber then fire it off safely.
Fact is a pistol was loaded with a live mag in a classroom
Side Note: I was tought to unload any weapon before entering a building