VirtualBox

Ignore:
Timestamp:
May 8, 2015 7:26:33 PM (10 years ago)
Author:
vboxsync
Message:

3D: save state: fix accedental SEGFAULT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r55764 r55766  
    12581258    GLuint i;
    12591259    GLfloat *pF;
    1260     CRFBDataElement *pEl;
    12611260    GLuint width;
    12621261    GLuint height;
     
    13191318        AssertReturn(rc == VINF_SUCCESS, rc);
    13201319
    1321         /* Init to default depth value, just in case. */
    1322         pF = (GLfloat*)pEl->pvData;
     1320        /* Init to default depth value, just in case. "pData->cElements - 1" because we incremented counter in crVBoxAddFBDataElement(). */
     1321        pF = (GLfloat*)pData->aElements[pData->cElements - 1].pvData;
    13231322        for (i = 0; i < width * height; ++i)
    13241323            pF[i] = 1.;
     
    13531352        AssertReturn(rc == VINF_SUCCESS, rc);
    13541353
    1355         /* Init to default depth value, just in case. */
    1356         pF = (GLfloat*)pEl->pvData;
     1354        /* Init to default depth value, just in case. "pData->cElements - 1" because we incremented counter in crVBoxAddFBDataElement(). */
     1355        pF = (GLfloat*)pData->aElements[pData->cElements - 1].pvData;
    13571356        for (i = 0; i < width * height; ++i)
    13581357            pF[i] = 1.;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette