TACOMA, Wash. (AP) — A judge has dismissed a wrongful death lawsuit brought against Pierce County by the family of sheriff’s deputy Daniel McCartney, who was fatally shot while responding to a call.

McCartney, 34, was shot Jan. 7, 2018 while responding to a home invasion robbery in the Frederickson area, the News Tribune reported. He’s survived by his wife and three young sons.

The lawsuit alleged deputies are not safe due to inadequate staffing. It sought damages as well as “an order mandating sufficient staffing or other equitable relief that will prevent a repeat of another wrongful deputy death.”

Superior Court Judge Karena Kirkendoll granted the county’s motion to dismiss the complaint Monday, according to court records.

The county’s motion said McCartney was aware of the hazards of the job but “voluntarily confronted that risk.”

“Professional rescuers assume certain risks inherent in their jobs and may not collect damages from those whose negligence brings about such risks,” the county argued.

A response filed on behalf of the family argued the county misapplied the professional rescuer doctrine.

“Understaffing is not an inherent risk of working as a law enforcement officer,” the lawsuit said. “Pierce County was duty bound to provide sufficient staff or alternatively to decline a law enforcement response and to inform the public of the inability to keep its residents safe by timely responding to calls with sufficient staffing.”