[(try 3) 1/3] wined3d: Don't call wglMakeCurrent(NULL, NULL) in context_set_current() if the current context is NULL.

Rico Schüller kgbricola at web.de
Sat Sep 19 07:16:24 CDT 2009


Am 19.09.2009 12:29, schrieb Rico Schüller:
> 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.
>
> try 3 improvements:
> - try 2 had the wrong test patch (3/3), so this time with the correct one
>
> try 2 improvements:
> - moved the check from winex11.drv to gdi32 (because we don't need any 
> X11 functionality)
> - order of patches changed
>
> The first patch fixes the behaviour in wined3d. The second one adds 
> the fix in gdi32 to change the behaviour to the one on xp. The third 
> patch adds a test case to opengl32/tests.
>
> Cheers
> Rico
>
> ---
>  dlls/wined3d/context.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> ------------------------------------------------------------------------
>
>
>    
I have to add some more tests. I'll resend a better version of the patch 
set.

Cheers
Rico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090919/e80b4f13/attachment.htm>


More information about the wine-patches mailing list