[PD-dev] how to check if buffer is valid...