Handle the case of 0-length waveform in pulse_viewer.

Kazu