From 63e1d822a5cae83837dcd8df0e3aed8b77bed89d Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Mon, 20 Oct 2003 12:46:48 +0000 Subject: [PATCH] Throw exception in sendPacket if packet is null. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2151 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 4cb340f8d..e6d56daff 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -545,6 +545,9 @@ public class XMPPConnection { if (!isConnected()) { throw new IllegalStateException("Not connected to server."); } + if (packet == null) { + throw new NullPointerException("Packet is null."); + } packetWriter.sendPacket(packet); }