mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Add a warning when we encounter an empty stream in Parser_makeFilter
Having a warning here would have meant that issue 6360 could have been solved in approximately five minutes, instead of an hour. To avoid that happening again, this patch adds a warning whenever we treat a stream as empty.
This commit is contained in:
parent
88e0326787
commit
f814fdc215
1 changed files with 1 additions and 0 deletions
|
@ -525,6 +525,7 @@ var Parser = (function ParserClosure() {
|
|||
},
|
||||
makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
|
||||
if (stream.dict.get('Length') === 0 && !maybeLength) {
|
||||
warn('Empty "' + name + '" stream.');
|
||||
return new NullStream(stream);
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue