[RESEND]Make wine_glGetString() return NULL on null gl context - Solves Bug 13599
Massimo Del Fedele
max at veneto.com
Wed Jul 2 09:37:28 CDT 2008
H. Verbeet ha scritto:
> 2008/7/1 Massimo Del Fedele <max at veneto.com>:
>> + if(NtCurrentTeb()->glContext == NULL)
>> + return NULL;
>> +
> Alexandre said on IRC that you should probably use
> wglGetCurrentContext() there, rather than using NtCurrentTeb()
> directly.
>
>
>
As it was used just at top of wgl.c, here :
void enter_gl(void)
{
Wine_GLContext *curctx = (Wine_GLContext *) NtCurrentTeb()->glContext;
if (curctx && curctx->do_escape)
{
enum x11drv_escape_codes escape = X11DRV_SYNC_PIXMAP;
ExtEscape(curctx->hdc, X11DRV_ESCAPE, sizeof(escape),
(LPCSTR)&escape, 0, NULL);
}
wine_tsx11_lock_ptr();
return;
}
I used NtCurrentTeb()....but it can be changed. I'll resend the patch...
Max
More information about the wine-patches
mailing list