diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 08d1554c4f1..526c7492531 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -96,7 +96,7 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags) struct wined3d *object; HRESULT hr; - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(struct wined3d, adapters[1])); if (!object) { ERR("Failed to allocate wined3d object memory.\n");