diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp index 4fc38be0..b22cb43b 100644 --- a/src/pentaxmn.cpp +++ b/src/pentaxmn.cpp @@ -1167,6 +1167,8 @@ namespace Exiv2 { std::ostream& PentaxMakerNote::printShutterCount(std::ostream& os, const Value& value, const ExifData* metadata) { + if ( ! metadata ) return os << "undefined" ; + ExifData::const_iterator dateIt = metadata->findKey( ExifKey("Exif.PentaxDng.Date")); if (dateIt == metadata->end()) {