title: Access Violation DirectWrite
body: <p>I am using the DirectWrite API and I am implementing my own layout and text rendering engine. I have already created my <code>IDWriteTextLayout</code> object successfully. When I make the following call I receive an Access Violation error and I have no idea why:</p>
  
  <pre><code>DWRITE_LINE_METRICS m_lineMetrics;
  UINT32 m_lineCount;
  
  DX::ThrowIfFailed(
     m_textLayout-&gt;GetLineMetrics(&amp;m_lineMetrics,31,&amp;m_lineCount)
  );
  </code></pre>