diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e4b970cf62c..f94d77a1dda 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -982,10 +982,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_2d); checkGLcall("glDeleteTextures(count, device->dummy_texture_2d)"); - memset(device->dummy_texture_cube, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_cube)); - memset(device->dummy_texture_3d, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_3d)); - memset(device->dummy_texture_rect, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_rect)); - memset(device->dummy_texture_2d, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_2d)); + memset(device->dummy_texture_cube, 0, count * sizeof(*device->dummy_texture_cube)); + memset(device->dummy_texture_3d, 0, count * sizeof(*device->dummy_texture_3d)); + memset(device->dummy_texture_rect, 0, count * sizeof(*device->dummy_texture_rect)); + memset(device->dummy_texture_2d, 0, count * sizeof(*device->dummy_texture_2d)); } static LONG fullscreen_style(LONG style)