Added exception throw on Value pointer being null

v can be null if the typeId is invalid => throw an exception notifying
the user that his file is corrupted instead of the assertion
v0.27.3
Dan Čermák 8 years ago
parent 75940da0a6
commit c686843e20

@ -1554,7 +1554,9 @@ namespace Exiv2 {
}
}
Value::AutoPtr v = Value::create(typeId);
assert(v.get());
if (!v.get()) {
throw Error(58);
}
if ( !isize ) {
v->read(pData, size, byteOrder());
} else {

Loading…
Cancel
Save