I assume you mean where a gun was cocked and the person holding it unintentionally touched the trigger while it was pointed at someone and they ended up shooting them without meaning to. I assume that's what you mean.
Yep there are many such cases. But I'd have to dig to find them. Others may recall some specifically.
At the end of the second world war the U.S. military wanted to move away from the 1911 to a da/sa sidearm in part due to accidents where soldiers pointed the 1911 at folks, without the safety being on, and unintentionally set it off (the U.S. eventually got the Berretta 92). The German military had issued the Walther P38 to it's troops before the war began with it's long heavy da first shot to make it harder for "accidents" to occur. This was because some had with the Luger.
After the war the da/sa guns became the dominant service sidearms around most of the globe. Didn't stop some from cocking the hammer and inadverdantly shooting some.
In the 70s there were cases where cops held suspects at gun point with a cocked service revolver (this used to be common) there were a few cases of "unintended discharges" and lawsuits followed. Some departments went to dao revolvers as a result. Others simply tried to train officers not to hold folks under a cocked wheelgun, an extremely bad practice.
NYC when it first adopted the Glock as a service sidearm requested and got a heavier trigger pull than the standard on the trigger (the NYC trigger) in an effort to avoid "accidental discharges". They had a history of such with both revolvers and da/sa pistols.
So yes there is a long history of this.
You see in the movies and TV all the time people point a gun at someone and say "Stop right there" or somesuch, and then cock the hammer to emphasize how serious they are. They then wave the gun around or use it to point at things. In real life folks sometimes do that as well and someone or something gets shot.