I know that when I applied for my pistol permit in Niagara County, NY, among the first questions I was asked was whether or not I was (A) divorced or (B) paying some sort of alimony or child support. If either A or B had been true, it may have been sufficient grounds for the judge to deny my permit. Now, as for those who already had a pistol permit and were later divorced, I'm nearly certain the court cannot revoke your permit (or confiscate your handguns) because you're going through a Divorce or a child custody battle. Divorce is not a crime, therefore it does not provide grounds to revoke a right or privilege. However, in NY, any issue which MAY bring into question *anything* about your moral character during the permit application process is reason enough for a judge (especially an anti-gun judge) to deny a pistol permit application, you're then forced to hire an attorney to resolve the situation after that point.
An arrest is grounds to revoke a pistol permit in NY, as well as most other States, especially any that are MAY-issue. In fact, I work with a guy who was mistakenly arrested for a crime he couldn't have possibly committed (he had never been arrested in his life, and he was out-of-town in Florida during the time of this crime, someone from his neighborhood randomly reported his car as being at the scene of a vandalism), his pistol permit was immediately revoked upon being arrested, and he had to surrender all his handguns to the local Sheriffs office. After the charges were completely dropped and case dismissed (the same day), it took him over a year to get his permit back along with his guns, which were all legitimately registered on his permit. Just don't get arrested or do anything that would allow your to-be ex to file a restraining order, and you'll be A-ok with your firearms and permit.