diff --git a/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java b/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java index 933bc0c77a..761a12ac21 100644 --- a/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java +++ b/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java @@ -57,6 +57,7 @@ public ByteBufferVirtualObject(QueryContext reusable, EClass eClass, int capacit this.uuid = reusable.getDatabaseInterface().newUuid(); int unsettedLength = reusable.getPackageMetaData().getUnsettedLength(eClass); + ensureCapacity(buffer.position(), 16 + unsettedLength); buffer.put(new byte[unsettedLength]); buffer.putLong(this.uuid.getMostSignificantBits()); buffer.putLong(this.uuid.getLeastSignificantBits());