From 33134b13438cbbb7cc6bd9a35982b5550fa0df92 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Mon, 17 Dec 2012 16:02:21 +0900 Subject: [PATCH] Ensure PooledByteBuf.init() is not called with null memory --- buffer/src/main/java/io/netty/buffer/PooledByteBuf.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buffer/src/main/java/io/netty/buffer/PooledByteBuf.java b/buffer/src/main/java/io/netty/buffer/PooledByteBuf.java index a05e32fb1c..483985ecc9 100644 --- a/buffer/src/main/java/io/netty/buffer/PooledByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/PooledByteBuf.java @@ -40,6 +40,8 @@ abstract class PooledByteBuf extends AbstractByteBuf implements Unsafe { void init(PoolChunk chunk, long handle, T memory, int offset, int length) { assert handle >= 0; + assert memory != null; + this.chunk = chunk; this.handle = handle; this.memory = memory;