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

Commit

Permalink
Fix for null reference exception in DeviceContext.RasterizerStage
Browse files Browse the repository at this point in the history
  • Loading branch information
Treff committed Jun 9, 2016
1 parent e2f613c commit a3fb181
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/SharpDX.Direct3D11/DeviceContext.RasterizerStage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void SetScissorRectangles<T>(params T[] scissorRectangles) where T : stru

unsafe
{
void* pBuffer = Interop.Fixed(scissorRectangles);
void* pBuffer = scissorRectangles == null ? (void*) null : Interop.Fixed(scissorRectangles);
SetScissorRects(scissorRectangles == null ? 0 : scissorRectangles.Length, (IntPtr)pBuffer);
}
}
Expand Down Expand Up @@ -198,7 +198,7 @@ public void SetViewport(RawViewportF viewport)
/// <remarks><p></p><p>All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.</p><p>Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.</p></remarks>
public unsafe void SetViewports(RawViewportF[] viewports, int count = 0)
{
void* pBuffer = Interop.Fixed(viewports);
void* pBuffer = viewports == null ? (void*) null : Interop.Fixed(viewports);
SetViewports(viewports == null ? 0 : count <= 0 ? viewports.Length : count, (IntPtr)pBuffer);
}

Expand Down

0 comments on commit a3fb181

Please sign in to comment.