[PATCH 1/3] winex11.drv: Check the current context in X11DRV_wglMakeCurrent().

Rico Schüller kgbricola at web.de
Fri Sep 18 08:39:12 CDT 2009


Hi,

this patch series fixes a bug which happens on windows with wined3d. 
There a second call to wglMakeCurrent(NULL, NULL) fails, which will in 
one case result in an early return in context_set_current(), which 
doesn't set the the current context to NULL in such a case, but frees 
the variable. So on the next call to context_set_current() (e.g. from 
WineD3D_CreateFakeGLContext()) the memory in old->... could be some 
other random memory and the app could crash.

The first patch adds a fix for winex11.drv to change the behaviour to 
the one on xp. The second patch adds a test case to opengl32/tests. And 
the third one fixes the behaviour in wined3d.

Cheers
Rico

---
  dlls/winex11.drv/opengl.c |   13 +++++++++++--
  1 files changed, 11 insertions(+), 2 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05157d7cac91a4ca9995f9322c1aae7af40e6e47.diff
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090918/7dc30acd/attachment.bin>


More information about the wine-patches mailing list