[PATCH] wined3d: Remove a useless NULL check (Coverity)

Marcus Meissner meissner at suse.de
Tue Aug 30 08:51:27 CDT 2011


Hi,

we check rt for NULL, but 3 lines higher it is already dereferenced.
So leave the check out. CID5289

Ciao, Marcus
---
 dlls/wined3d/context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index de0933c..e44ee81 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2076,7 +2076,7 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de
             ENTER_GL();
             context_apply_fbo_state_blit(context, GL_FRAMEBUFFER, rt, NULL, rt->draw_binding);
             LEAVE_GL();
-            if (rt && rt->resource.format->id != WINED3DFMT_NULL)
+            if (rt->resource.format->id != WINED3DFMT_NULL)
                 rt_mask = 1;
             else
                 rt_mask = 0;
-- 
1.7.1




More information about the wine-patches mailing list