From 0630d09082c47c0e62fb1b1453a6b4f2f3a1f227 Mon Sep 17 00:00:00 2001 From: norbertwg Date: Thu, 16 May 2024 17:41:40 +0200 Subject: [PATCH] check if exifdata is not null (cherry picked from commit 9e46ae31b1dbec7d8c05679d2f0db1830a5fb0e1) --- src/canonmn_int.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/canonmn_int.cpp b/src/canonmn_int.cpp index e244bedbcc..84e365e01f 100644 --- a/src/canonmn_int.cpp +++ b/src/canonmn_int.cpp @@ -2641,6 +2641,10 @@ std::ostream& CanonMakerNote::print0x000a(std::ostream& os, const Value& value, std::ostream& CanonMakerNote::print0x000c(std::ostream& os, const Value& value, const ExifData* exifData) { std::istringstream is(value.toString()); + if (!exifData) { + return os << value; + } + ExifKey key("Exif.Canon.ModelID"); auto pos = exifData->findKey(key); // if model is EOS D30