d3drm: Pass the correct pointer to IDirectXFileData_GetData (PVS-Studio).

Also remove an uneeded initialization of "size" as that is purely an
[OUT] parameter.
This commit is contained in:
Michael Stefaniuc 2014-10-30 11:24:20 +01:00 committed by Alexandre Julliard
parent dd923c3029
commit 0726542ded

View File

@ -1240,17 +1240,16 @@ static HRESULT load_data(IDirect3DRM3 *iface, IDirectXFileData *data_object, IID
/* Cannot be requested */ /* Cannot be requested */
if (parent_frame) if (parent_frame)
{ {
D3DRMMATRIX4D matrix; D3DRMMATRIX4D *matrix;
DWORD size; DWORD size;
TRACE("Load Frame Transform Matrix data\n"); TRACE("Load Frame Transform Matrix data\n");
size = sizeof(matrix); hr = IDirectXFileData_GetData(data_object, NULL, &size, (void**)&matrix);
hr = IDirectXFileData_GetData(data_object, NULL, &size, (void**)matrix);
if ((hr != DXFILE_OK) || (size != sizeof(matrix))) if ((hr != DXFILE_OK) || (size != sizeof(matrix)))
goto end; goto end;
hr = IDirect3DRMFrame3_AddTransform(parent_frame, D3DRMCOMBINE_REPLACE, matrix); hr = IDirect3DRMFrame3_AddTransform(parent_frame, D3DRMCOMBINE_REPLACE, *matrix);
if (FAILED(hr)) if (FAILED(hr))
goto end; goto end;
} }