The opinions expressed by columnists are their own and do not necessarily represent the views of Townhall.com.

Last year, right after a student fatally shot eight classmates and two teachers at Santa Fe High School, Texas Lt. Gov. Dan Patrick urged Texans to lock up their firearms. The killer had stolen his father’s guns.

On the last night of the legislative session, the Republican-dominated state legislature approved a $1 million public safety campaign for gun storage. The Associated Press and other national media are playing this as a major test of NRA power in “gun loving Texas,” and they are waiting to see if Governor Greg Abbott will veto the spending. If the NRA can be defeated in Texas, that will animate Democrats’ hopes that it can be defeated anywhere.

We all want to do something, but more lives will be lost than saved if everyone locks up their guns.

Gun storage is primarily designed to prevent accidental gun deaths of children. According to the Centers for Disease Control, Texas averaged 8 accidental juvenile gun deaths a year from 2013 to 2017. That’s about 8 percent of the number of such deaths nationwide. This is smaller than Texas’ more than 10 percent share of the under-18 population.

It must be a puzzle for gun control advocates since a significantly larger percent of Texas households have guns and the state doesn’t have the gun “safety” laws that other states have.

But now, legislators have gotten the idea that gun locks will help prevent mass public shootings. Very few shootings have involved guns stolen from parents. In 2012, 20-year-old Adam Lanza stole his mother’s gun, though she already kept it in a safe. So, a new law would have made no difference.

Since 2000, including Sante Fe, there have been three US mass public shootings by a juvenile killer. But the Red Lake, Minnesota attack was committed by a 17-year-old who killed his grandfather, an Indian Reservation police officer, and then took his service gun off his dead body. So, again, gun locks wouldn’t have stopped that attack either.

Unfortunately, mandating gun locks can have unintended consequences.

According to my research, which has been published in the Journal of Law and Economics and elsewhere, such laws have made it more difficult for people to successfully defend themselves and their families. Criminals became more emboldened to invade people’s homes. There were 300 more total murders and 4,000 more rapes occurring each year in the states with these laws. Burglaries also rose dramatically.

That is not particularly surprising given that crime rises when we infringe on people’s right to self-defense. Indeed, every place in the world that has banned guns has seen an increase in murder.

If locking up guns could have prevented all three of the mass shootings that were committed by juveniles since 2000, there would have been 21 fewer deaths and 19 fewer people who were wounded. In reality, these killers could have obtained weapons in other ways. But for the sake of argument, let's accept this number. One could even add in the annual number of accidental gun deaths and assume that these would also have been prevented.

The final number would still be only a fraction of those who die in a single year because states with mandatory locks kept people from getting to their guns in time.

In truth, gun lock laws didn’t even reduce accidental gun deaths among children or teenagers. Few accidental gunshots take place in law-abiding, normal homes. In fact, most accidental gunshots that result in the deaths of minors are fired by adult males who have criminal histories and are in their mid-to-late 20s. Many are drug addicts or alcoholics.

Unless you send your child to play at a violent criminal's home, your child is exceedingly unlikely to get shot at a gun owner's home. It makes much more sense to check for a criminal history than for whether they are gun owners.

We see news stories about the horrible deaths and injuries that occur from school shootings. And rightly so. But we don't hear about the deaths that occur because people can’t readily access a gun to protect themselves and their families. These latter deaths are no less horrific.

The media just can’t help itself playing this public safety campaign spending as a defeat of those who support gun ownership. But the media completely ignores another bill that really will project school children, a bill that expands Texas’ program to let teachers carry guns at school.

Ads of children accidentally shooting each other will scare many people into keeping their guns locked. But this is really scaring people into compromising their safety.

We need to pass whichever laws save the most lives. There has never been a shooting in any school that allows teacher and staff to carry concealed handguns. What we don't need are any more laws that leave people defenseless.