exifpanel: ignore errors when printing tags in human-readable form

(cherry picked from commit 47fa34e7365d618f250826eb412c72fe0ab8cfed)
This commit is contained in:
Alberto Griggio
2020-05-20 16:31:33 +02:00
committed by Lawrence Lee
parent 6cec805774
commit 0415d556fc

View File

@@ -303,10 +303,12 @@ void ExifPanel::refreshTags()
const auto to_value =
[&](Exiv2::Exifdatum &tag) -> Glib::ustring
{
if (!tag.tagLabel().empty() && //tag.typeId() != Exiv2::undefined &&
(tag.typeId() == Exiv2::asciiString || tag.size() < 256)) {
return escapeHtmlChars(tag.print(&exif));
}
try {
if (!tag.tagLabel().empty() && //tag.typeId() != Exiv2::undefined &&
(tag.typeId() == Exiv2::asciiString || tag.size() < 256)) {
return escapeHtmlChars(tag.print(&exif));
}
} catch (std::exception &) {}
return "<i>(" + M("EXIFPANEL_VALUE_NOT_SHOWN") + ")</i>";
};