Added safety check in case the byte buffer is NULL.

This commit is contained in:
Klaus Reimer 2011-02-08 22:21:57 +01:00 committed by k
parent a61e0be5eb
commit 715bc509bc

View File

@ -30,6 +30,8 @@ public abstract class USB_Descriptor_Header
public USB_Descriptor_Header(final ByteBuffer data)
{
if (data == null)
throw new IllegalArgumentException("data must not be null");
this.data = data;
}