winex11.drv: Fix logical error in if-condition (PVS-Studio)
Michael Stefaniuc
mstefani at redhat.de
Thu Oct 30 17:16:17 CDT 2014
The existing logic can be simplified to
if (dest->has_been_current)
but that doesn't matches the ERR message...
---
dlls/winex11.drv/opengl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 71af3db..11f4119 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1927,7 +1927,7 @@ static BOOL glxdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de
* current or when it hasn't shared display lists before.
*/
- if((org->has_been_current && dest->has_been_current) || dest->has_been_current)
+ if (org->has_been_current || dest->has_been_current)
{
ERR("Could not share display lists, one of the contexts has been current already !\n");
return FALSE;
--
1.8.3.1
More information about the wine-patches
mailing list