Joshua Beck jxb091000@utdallas.edu wrote:
350: str = (const char *) pglGetString(GL_EXTENSIONS); 351: WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
From this it's obvious that pglGetString is returning a null pointer.
What OpenGL driver are you using? glGetString(GL_EXTENSIONS) returning NULL might be a driver bug.
It would be better to do something like this instead:
str = (const char *) pglGetString(GL_EXTENSIONS); if(str == 0) { ERR( "Couldn't find GL_EXTENSIONS string, disabling OpenGL.\n" ); goto done; } WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
What do you think?
WineGLInfo.glExtensions is used in other places in the code, it must be initialized.