Characterization of the closedness of the sum of two shift-invariant spaces☆