fix segfault due to pulse input race condition

Fixes a problem where we may receive pulse input data before the higher-level code has set up the buffer for use, resulting in a segfault.