mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibPDF: Allow filter DecodeParms array entries to be null
Filters will use the default values in this case.
This commit is contained in:
parent
34350ee9e7
commit
96064ec5af
1 changed files with 4 additions and 2 deletions
|
@ -495,8 +495,10 @@ PDFErrorOr<NonnullRefPtr<StreamObject>> Parser::parse_stream(NonnullRefPtr<DictO
|
|||
if (decode_parms_object->is<ArrayObject>()) {
|
||||
auto decode_parms_array = decode_parms_object->cast<ArrayObject>();
|
||||
for (size_t i = 0; i < decode_parms_array->size(); ++i) {
|
||||
// FIXME: This entry may be the null object instead
|
||||
RefPtr<DictObject> decode_parms = decode_parms_array->at(i).get<NonnullRefPtr<Object>>()->cast<DictObject>();
|
||||
RefPtr<DictObject> decode_parms;
|
||||
auto entry = decode_parms_array->at(i);
|
||||
if (entry.has<NonnullRefPtr<Object>>())
|
||||
decode_parms = entry.get<NonnullRefPtr<Object>>()->cast<DictObject>();
|
||||
decode_parms_vector.append(decode_parms);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue