In the paper, stability of a fourth-order switched affine system with state-dependent switching law is studied. Such a system arises when stabilizing the chain of four integrators with the help of a special control that makes the system track a desired trajectory when approaching the equilibrium state. The target trajectory is defined implicitly as that of the second-order integrator stabilized by means of a feedback in the form of nested saturators. One of the three linear systems composing the switched system under study is stable at the origin, while the two others have no stationary equilibria at all. The set of values of the feedback coefficients is determined for which the zero solution of the switched system is globally stable. Studying global stability of the system is shown to reduce to a simpler task of establishing stability of a second-order switched linear system with state-dependent switching law. It is proved that the latter system is stable for arbitrary switchings.