Changeset 2977 for trunk/src


Ignore:
Timestamp:
Mar 3, 2000, 12:09:21 AM (25 years ago)
Author:
sandervl
Message:

check for null pointer in wglSetPixelFormat

Location:
trunk/src/opengl/mesa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/3dfx/fxwgl.c

    r2938 r2977  
    797797  qt_valid_pix = qt_pix;
    798798
     799#ifdef __WIN32OS2__
     800  if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || (ppfd && ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))) {
     801#else
    799802  if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR)) {
     803#endif
    800804    SetLastError(0);
    801805    return(FALSE);
  • trunk/src/opengl/mesa/wgl.c

    r2962 r2977  
    1 /* $Id: wgl.c,v 1.2 2000-03-01 18:49:40 jeroen Exp $ */
     1/* $Id: wgl.c,v 1.3 2000-03-02 23:09:21 sandervl Exp $ */
    22
    33/*
     
    396396
    397397    qt_valid_pix = qt_pix;
    398     if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
     398//    if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
     399    if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))
    399400    {
    400401        SetLastError(0);
     
    466467GLAPI PROC GLWINAPI wglGetProcAddress(LPCSTR lpszProc)
    467468{
    468     int         i;
     469    int i;
    469470    for(i = 0;i < qt_ext;i++)
    470471        if(!strcmp(lpszProc,ext[i].name))
     
    491492
    492493    qt_valid_pix = qt_pix;
     494#ifdef __WIN32OS2__
     495    if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || (ppfd && ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR)))
     496#else
    493497    if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))
     498#endif
    494499    {
    495500        SetLastError(0);
Note: See TracChangeset for help on using the changeset viewer.