Wherever a duty is imposed by this Code upon the sheriff, the same duty may lawfully be performed by his deputy. When there is no sheriff in a county, the duties of that office, as to all proceedings under the criminal law, devolve upon the officer who, under the law, is empowered to discharge the duties of sheriff, in case of vacancy in the office.
Tex. Code Crim. Proc. § 2.20