Yeah, he should just "hold it" for another five hours, if he needs to pee.
He shouldn't be peeing while trying to fly the plane, either
My point is, before touching the gun, he should have turned over control of the plane to the co-pilot, and devoted his full attention to the task at hand, whether that is securing his gun or avoiding making a puddle on the cabin floor.
The pilots union implied the negligent discharge was caused by the pilot trying to do two important things at the same time (flying and manipulating a gun), and my point is that you should avoid trying to do that kind of multi-tasking