diff options
-rw-r--r-- | src/exiv2wrapper.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp index ad37f57..071d916 100644 --- a/src/exiv2wrapper.cpp +++ b/src/exiv2wrapper.cpp @@ -1,6 +1,6 @@ // ***************************************************************************** /* - * Copyright (C) 2006-2010 Olivier Tilloy <olivier@tilloy.net> + * Copyright (C) 2006-2011 Olivier Tilloy <olivier@tilloy.net> * * This file is part of the pyexiv2 distribution. * @@ -553,7 +553,14 @@ ExifTag::ExifTag(const std::string& key, // (see https://bugs.launchpad.net/pyexiv2/+bug/684177). #if EXIV2_TEST_VERSION(0,21,0) Exiv2::ExifKey exifKey(key); - _type = Exiv2::TypeInfo::typeName(exifKey.defaultTypeId()); + if (_data != 0) + { + _type = _datum->typeName(); + } + else + { + _type = Exiv2::TypeInfo::typeName(exifKey.defaultTypeId()); + } _name = exifKey.tagName(); _label = exifKey.tagLabel(); _description = exifKey.tagDesc(); |