Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 3ca7ebf

Browse files
authored
Merge pull request #995 from mrvux/streamout
[Direct3D11] SetTarget, allow null
2 parents 109bd7f + 1cae463 commit 3ca7ebf

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

Source/SharpDX.Direct3D11/DeviceContext.StreamOutputStage.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ internal void SetTargets(int numBuffers, SharpDX.Direct3D11.Buffer[] sOTargetsOu
6464
/// <unmanaged-short>ID3D11DeviceContext::SOSetTargets</unmanaged-short>
6565
public unsafe void SetTarget(Buffer buffer, int offsets)
6666
{
67-
if (buffer == null)
68-
{
69-
throw new ArgumentNullException("buffer");
70-
}
71-
72-
var ptr = buffer.NativePointer;
67+
var ptr = buffer != null ? buffer.NativePointer : IntPtr.Zero;
7368

7469
SetTargets(1, new IntPtr(&ptr), new IntPtr(&offsets));
7570
}

0 commit comments

Comments
 (0)