diff --git a/README.md b/README.md index 03803ac..60c203d 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,9 @@ Gamma of image (0 if not specified) Changelog ============ +### 0.4.0 - Jun 05 2013 + - fixed reading of destroyed input stream + ### 0.4.0-alpha - 29 Nov 2012 - added zlib deflateStrategy option, default to Z_RLE (by pdpotter) - added possibility to use multiple filters (by pdpotter, modified by niegowski) diff --git a/lib/chunkstream.js b/lib/chunkstream.js index f3e1352..e8ddac5 100755 --- a/lib/chunkstream.js +++ b/lib/chunkstream.js @@ -125,7 +125,7 @@ ChunkStream.prototype.destroy = function() { ChunkStream.prototype._process = function() { // as long as there is any data and read requests - while (this._buffered > 0 && this._reads.length > 0) { + while (this._buffered > 0 && this._reads && this._reads.length > 0) { var read = this._reads[0]; diff --git a/package.json b/package.json index 7269846..fe899b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pngjs", - "version": "0.4.0-alpha", + "version": "0.4.0", "description": "Simple PNG encoder/decoder", "author": "Kuba Niegowski", "contributors": [],