ddraw: Clear application-passed lpSurface pointers.

This commit is contained in:
Stefan Dösinger 2014-08-19 14:20:28 +02:00 committed by Alexandre Julliard
parent fc6ec997e2
commit 61ee3323ad
5 changed files with 5 additions and 0 deletions

View File

@ -6224,6 +6224,7 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, s
desc->u1.lPitch = wined3d_surface_get_pitch(wined3d_surface);
}
}
desc->lpSurface = NULL;
wined3d_surface_incref(wined3d_surface);
surface->wined3d_surface = wined3d_surface;

View File

@ -4576,6 +4576,7 @@ static void test_create_surface_pitch(void)
ok(U1(surface_desc).lPitch == test_data[i].pitch_out32,
"Test %u: Got unexpected pitch %u, expected %u.\n",
i, U1(surface_desc).lPitch, test_data[i].pitch_out32);
ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface);
IDirectDrawSurface_Release(surface);
}

View File

@ -5652,6 +5652,7 @@ static void test_create_surface_pitch(void)
ok(U1(surface_desc).lPitch == test_data[i].pitch_out32,
"Test %u: Got unexpected pitch %u, expected %u.\n",
i, U1(surface_desc).lPitch, test_data[i].pitch_out32);
ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface);
IDirectDrawSurface_Release(surface);
}

View File

@ -6649,6 +6649,7 @@ static void test_create_surface_pitch(void)
ok(U1(surface_desc).lPitch == test_data[i].pitch_out32,
"Test %u: Got unexpected pitch %u, expected %u.\n",
i, U1(surface_desc).lPitch, test_data[i].pitch_out32);
ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface);
IDirectDrawSurface4_Release(surface);
}

View File

@ -6472,6 +6472,7 @@ static void test_create_surface_pitch(void)
ok(U1(surface_desc).lPitch == test_data[i].pitch_out32,
"Test %u: Got unexpected pitch %u, expected %u.\n",
i, U1(surface_desc).lPitch, test_data[i].pitch_out32);
ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface);
IDirectDrawSurface7_Release(surface);
}