diff --git a/src/node_buffer.cc b/src/node_buffer.cc index dfa5ea38dc..b46abe1e3d 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -134,6 +134,7 @@ Buffer* Buffer::New(size_t length) { Local arg = Integer::NewFromUnsigned(length); Local b = constructor_template->GetFunction()->NewInstance(1, &arg); + if (b.IsEmpty()) return NULL; return ObjectWrap::Unwrap(b); }