That's a tough one. If the weapon is stored in a locked container or has a locking device such as a trigger lock, you are off the hook no matter what happens. If a "child" breaks into your house and steals your unlocked weapon and hurts someone, it appears you are off the hook. If your child gains access to an unlocked weapon and shoots someone in a lawful act of self defense or in the protection of another, you are off the hook. The problem is if your kids or someone elses kids (their friends) gain access to the weapon and someone is hurt, you will be liable if the weapon was not secured in a way "... a reasonable person would believe to be secure." That means a locked container, with a trigger lock, or some other "reasonable" means of storage. I don't know if storage in a locked room is reasonable, but one would think it is.
The primary issue is would you be liable if your kids or some other kids broke the glass on your cabinet, took the gun, and then hurt someone (including themselves)? I don't know.
You need to look at CA Penal Code 12035 and 12036. They are very similar, with 12036 being more concerned with handguns.