[ros-diffs] [cwittich] 31179: only clear it when the buffer is valid