It's what I would have done, and I carry a revolver--no slide to unlock. Since you didn't point the gun at him or "brandish" it in a threatening manner, I don't think he had a beef coming. The officers apparently agreed.
Next questions: is it legal where you live to carry a gun loaded in your vehicle? And do you have a CC license?
In Kentucky, where I live, it's legal to carry a loaded firearm in your car without a license, but it is to be kept out of sight and not to leave the vehicle except when leaving or returning home. Strangely, as I understand it if you are licensed to carry concealed (and I am), in KY the weapon is supposed to be in plain view in a car or truck. Still haven't figured that one out.
The officers clearly thought you were in the right; but if, God forbid, you run into a similar situation again, the next LEO's might have questions about the legalities depending on your state's laws.
I say congratulations for heading off a potentially deadly confrontation without having to use your pistol.
"Don't let macho be your epitaph."