VirtualBox

Changeset 16036 in vbox for trunk/src


Ignore:
Timestamp:
Jan 19, 2009 10:13:51 AM (16 years ago)
Author:
vboxsync
Message:

crOpenGL: fix crash in spec viewperf tcvis-01 benchmark

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/array/arrayspu.c

    r16035 r16036  
    2626
    2727#ifdef CR_ARB_vertex_buffer_object
    28         if (array->e.buffer->data)
     28        if (array->e.buffer && array->e.buffer->data)
    2929        {
    3030            p = (unsigned char *)(array->e.buffer->data) + (unsigned long)p;
     
    4949
    5050#ifdef CR_ARB_vertex_buffer_object
    51                 if (array->a[attr].buffer->data)
     51                if (array->a[attr].buffer && array->a[attr].buffer->data)
    5252                {
    5353                    p = (unsigned char *)(array->a[attr].buffer->data) + (unsigned long)p;
     
    110110
    111111#ifdef CR_ARB_vertex_buffer_object
    112             if (array->t[unit].buffer->data)
     112            if (array->t[unit].buffer && array->t[unit].buffer->data)
    113113            {
    114114                p = (unsigned char *)(array->t[unit].buffer->data) + (unsigned long)p;
     
    162162
    163163#ifdef CR_ARB_vertex_buffer_object
    164         if (array->i.buffer->data)
     164        if (array->i.buffer && array->i.buffer->data)
    165165        {
    166166            p = (unsigned char *)(array->i.buffer->data) + (unsigned long)p;
     
    181181
    182182#ifdef CR_ARB_vertex_buffer_object
    183         if (array->c.buffer->data)
     183        if (array->c.buffer && array->c.buffer->data)
    184184        {
    185185            p = (unsigned char *)(array->c.buffer->data) + (unsigned long)p;
     
    252252
    253253#ifdef CR_ARB_vertex_buffer_object
    254         if (array->n.buffer->data)
     254        if (array->n.buffer && array->n.buffer->data)
    255255        {
    256256            p = (unsigned char *)(array->n.buffer->data) + (unsigned long)p;
     
    273273
    274274#ifdef CR_ARB_vertex_buffer_object
    275         if (array->s.buffer->data)
     275        if (array->s.buffer && array->s.buffer->data)
    276276        {
    277277            p = (unsigned char *)(array->s.buffer->data) + (unsigned long)p;
     
    306306
    307307#ifdef CR_ARB_vertex_buffer_object
    308         if (array->f.buffer->data)
     308        if (array->f.buffer && array->f.buffer->data)
    309309        {
    310310            p = (unsigned char *)(array->f.buffer->data) + (unsigned long)p;
     
    322322
    323323#ifdef CR_ARB_vertex_buffer_object
    324         if (array->a[VERT_ATTRIB_POS].buffer->data)
     324        if (array->a[VERT_ATTRIB_POS].buffer && array->a[VERT_ATTRIB_POS].buffer->data)
    325325        {
    326326            p = (unsigned char *)(array->a[VERT_ATTRIB_POS].buffer->data) + (unsigned long)p;
     
    376376
    377377#ifdef CR_ARB_vertex_buffer_object
    378         if (array->v.buffer->data)
     378        if (array->v.buffer && array->v.buffer->data)
    379379        {
    380380            p = (unsigned char *)(array->v.buffer->data) + (unsigned long)p;
     
    445445
    446446static void ARRAYSPU_APIENTRY arrayspu_DrawElements(GLenum mode, GLsizei count,
    447                                                                                                         GLenum type, const GLvoid *indices)
     447                                                    GLenum type, const GLvoid *indices)
    448448{
    449449    int i;
     
    469469
    470470#ifdef CR_ARB_vertex_buffer_object
    471     if (elementsBuffer->data)
     471    if (elementsBuffer && elementsBuffer->data)
    472472    {
    473473        p = (unsigned char *)(elementsBuffer->data) + (unsigned long)p;
     
    640640static void ARRAYSPU_APIENTRY
    641641arrayspu_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
    642                                                                 GLboolean normalized, GLsizei stride,
    643                                                                 const GLvoid *pointer)
     642                                GLboolean normalized, GLsizei stride,
     643                                const GLvoid *pointer)
    644644{
    645645    crStateVertexAttribPointerARB( index, size, type, normalized, stride, pointer );
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