| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fa71073 commit 4221b1c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -995,7 +995,10 @@ inline AllocatedBuffer::~AllocatedBuffer() { | |||
| 995 | 995 | ||
| 996 | 996 | inline void AllocatedBuffer::clear() { | |
| 997 | 997 | uv_buf_t buf = release(); | |
| 998 | - env_->Free(buf.base, buf.len); | ||
| 998 | + if (buf.base != nullptr) { | ||
| 999 | + CHECK_NOT_NULL(env_); | ||
| 1000 | + env_->Free(buf.base, buf.len); | ||
| 1001 | + } | ||
| 999 | 1002 | } | |
| 1000 | 1003 | ||
| 1001 | 1004 | // It's a bit awkward to define this Buffer::New() overload here, but it | |
| Back | FazBrowse Home | New Git URL |
0 commit comments