(a) It is not a conflict of interest for a district or county attorney under Section 157.901 to defend a county or a county official or employee sued by another county official or employee and also to advise or represent the opposing party on a separate matter arising from the performance of a public duty, regardless of whether the attorney gives the advice or representation to the opposing party before the suit began or while the suit is pending.
(b) If practicable, the district or county attorney shall assign a different attorney to defend the county or a county official or employee under this section than the attorney assigned to advise or represent the opposing party on a separate matter.
(c) This section does not require a district or county attorney to represent a county official or employee who brings a suit against the county or another county official or employee for an action arising from the performance of a public duty.