708c708,709
< std::memcpy(getPtr<uint8_t>(), p, getSize());
---
> if (p != getPtr<uint8_t>())
> std::memcpy(getPtr<uint8_t>(), p, getSize());