diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fa25b037481..e98541c429f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1518,7 +1518,7 @@ void texture2d_load_fb_texture(struct wined3d_texture *texture, checkGLcall("glCopyTexSubImage2D"); if (restore_texture) - context_restore(context, restore_texture->sub_resources[sub_resource_idx].u.surface); + context_restore(context, restore_texture->sub_resources[restore_idx].u.surface); } /* Does a direct frame buffer -> texture copy. Stretching is done with single