I will start by saying there is nothing wrong with showing another individual (especially your best friend) your firearm. I don't think the place was appropriate, but that doesn't matter in this case. In this case, the individual failed to practice safe gun handling techniques. If you were at my house, or we were at the range, or I was at your house, and you asked to see my firearm, I would inform you that it's loaded, but because we aren't among the general public....
Unholster remembering to always point in a safe direction.
Drop magazine
Cycle action to empty chamber, Cycle action several more times to ensure it is totally unloaded.
Open action and lock open. If you don't know how to do this with your firearms, you shouldn't carry them.
Once the action is locked back the firearm CANNOT fire. It CANNOT fire with the action open.
I can then hand it to you and you can handle it all the while keeping the muzzle pointed in a safe direction.
Eventually, you hand it back, I insert the mag and close the action, then holster the firearm.
No harm, no foul.
This was negligence.