How a gun “works” is that a thick-walled chamber houses the cartridge, so that as the powder ignited within rapidly expands (deflagration) there is nowhere for it to go besides violently propelling the projectile into the barrel. If there is no chamber, the thin walls of the cartidge are the path of least resistence, and the bullet likely stays put as the gases escape from cracks in the casing.
So no, while this wouldn’t be “safe” (eye damage comes to mind), there would not be enough energy to significantly wound a human by striking a round’s primer without a chamber.
Just because you’re not wrong doesn’t mean you’re right. “Spray and pray” is the lowest form of divine intervention. - Laws of Murphy, 69:420