sink_buffer: guard against NULL frames.