diff options
-rw-r--r-- | vcl/source/graphic/BinaryDataContainer.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/source/graphic/BinaryDataContainer.cxx b/vcl/source/graphic/BinaryDataContainer.cxx index af6e5968911c..80e059137e63 100644 --- a/vcl/source/graphic/BinaryDataContainer.cxx +++ b/vcl/source/graphic/BinaryDataContainer.cxx @@ -21,9 +21,12 @@ BinaryDataContainer::BinaryDataContainer(SvStream& stream, size_t size) size_t BinaryDataContainer::calculateHash() const { size_t nSeed = 0; - o3tl::hash_combine(nSeed, getSize()); - for (sal_uInt8 const& rByte : *mpData) - o3tl::hash_combine(nSeed, rByte); + if (mpData) + { + o3tl::hash_combine(nSeed, getSize()); + for (sal_uInt8 const& rByte : *mpData) + o3tl::hash_combine(nSeed, rByte); + } return nSeed; } |