diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp index c6b860d8..0c9b9c4a 100644 --- a/src/tiffcomposite.cpp +++ b/src/tiffcomposite.cpp @@ -1611,6 +1611,8 @@ namespace Exiv2 { uint32_t TiffImageEntry::doWriteImage(IoWrapper& ioWrapper, ByteOrder /*byteOrder*/) const { + if ( !pValue() ) throw Error(21); // #1296 + uint32_t len = pValue()->sizeDataArea(); if (len > 0) { #ifdef DEBUG