Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

null check

  • Loading branch information...
commit df02033f44b5e33efdc84caef38b5cdc3018c408 1 parent 5ea330f
@sujal authored
Showing with 5 additions and 2 deletions.
  1. +3 −1 lib/image_headers.js
  2. +2 −1  src/image_headers.coffee
View
4 lib/image_headers.js
@@ -277,7 +277,9 @@
ImageHeaders.prototype.reset_buffer_data = function() {
this.buffer_index = 0;
- return this.buffer.slice();
+ if ((this.buffer != null)) {
+ return this.buffer.slice();
+ }
};
ImageHeaders.prototype.end_parsing = function() {
View
3  src/image_headers.coffee
@@ -256,7 +256,8 @@ class ImageHeaders
reset_buffer_data: () ->
@buffer_index = 0
- @buffer.slice()
+ if (@buffer?)
+ @buffer.slice()
end_parsing: () ->
@reset_buffer_data()
Please sign in to comment.
Something went wrong with that request. Please try again.