d3d: Make sure vertexbuffer lock doesn't return a NULL pointer.

This commit is contained in:
Stefan Dösinger 2010-02-08 12:28:26 +01:00 committed by Alexandre Julliard
parent 24e2308670
commit bb035638d0
3 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,7 @@ static void lock_flag_test(IDirect3DDevice8 *device)
if(SUCCEEDED(hr))
{
ok(data != NULL, "The data pointer returned by Lock is NULL\n");
hr = IDirect3DVertexBuffer8_Unlock(buffer);
ok(hr == D3D_OK, "IDirect3DVertexBuffer8_Unlock failed, 0x%08x\n", hr);
}

View File

@ -103,6 +103,7 @@ static void lock_flag_test(IDirect3DDevice9 *device)
if(SUCCEEDED(hr))
{
ok(data != NULL, "The data pointer returned by Lock is NULL\n");
hr = IDirect3DVertexBuffer9_Unlock(buffer);
ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed, 0x%08x\n", hr);
}

View File

@ -3216,6 +3216,7 @@ static void VertexBufferLockRest(void)
test_data[i].debug_string, hr, test_data[i].result);
if(SUCCEEDED(hr))
{
ok(data != NULL, "The data pointer returned by Lock is NULL\n");
hr = IDirect3DVertexBuffer7_Unlock(buffer);
ok(hr == D3D_OK, "IDirect3DVertexBuffer7_Unlock failed, 0x%08x\n", hr);
}