diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index e13af5fa941..95ec3ea657c 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -415,16 +415,16 @@ static void context_apply_fbo_state(struct wined3d_context *context, GLenum targ context->rebind_fbo = FALSE; } - if (render_targets) - { - context->current_fbo = context_find_fbo_entry(context, target, render_targets, depth_stencil, location); - context_apply_fbo_entry(context, target, context->current_fbo); - } - else + if (location == SFLAG_INDRAWABLE) { context->current_fbo = NULL; context_bind_fbo(context, target, NULL); } + else + { + context->current_fbo = context_find_fbo_entry(context, target, render_targets, depth_stencil, location); + context_apply_fbo_entry(context, target, context->current_fbo); + } } /* GL locking is done by the caller */