Add check null on engine. 

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1396975 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-10-11 10:22:46 +00:00
parent 72eb191b74
commit 8af1df7aea
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public class NIOOutputStream extends OutputStream implements TimeStampStream {
// wrap more packets until we reach the end of data, but only when plain
// has no more space since we are non-blocking and a write might not have
// written anything.
if (data.hasRemaining() && !plain.hasRemaining()) {
if (engine != null && data.hasRemaining() && !plain.hasRemaining()) {
plain.clear();
engine.wrap(data, plain);
plain.flip();