Module: wine Branch: master Commit: e110c08cc8cfa1b2acd9c363d954a85ad61aa870 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e110c08cc8cfa1b2acd9c363d9...
Author: Ričardas Barkauskas rbarkauskas@codeweavers.com Date: Mon Aug 22 15:46:31 2011 +0300
wined3d: Avoid dereferencing null pointer in context_apply_clear_state when calling context_generate_rt_mask_from_surface.
---
dlls/wined3d/context.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 42d26bc..4abe18e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2066,7 +2066,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d } else { - rt_mask = context_generate_rt_mask_no_fbo(device, rts[0]); + rt_mask = context_generate_rt_mask_no_fbo(device, rt_count ? rts[0] : NULL); } } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO @@ -2079,7 +2079,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d } else { - rt_mask = context_generate_rt_mask_no_fbo(device, rts[0]); + rt_mask = context_generate_rt_mask_no_fbo(device, rt_count ? rts[0] : NULL); }
old_mask = context->current_fbo ? context->current_fbo->rt_mask : context->draw_buffers_mask;