VirtualBox

Changeset 23550 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 5, 2009 10:39:01 AM (15 years ago)
Author:
vboxsync
Message:

video 2d accel: map buffer ret value check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r23548 r23550  
    23202320    VBoxVHWATextureNP2Rect::load();
    23212321
    2322     vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, mPBO);
    2323 
    2324     vboxglBufferData(GL_PIXEL_UNPACK_BUFFER, memSize(), NULL, GL_STREAM_DRAW);
     2322    VBOXQGL_CHECKERR(
     2323            vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, mPBO);
     2324        );
     2325
     2326    VBOXQGL_CHECKERR(
     2327            vboxglBufferData(GL_PIXEL_UNPACK_BUFFER, memSize(), NULL, GL_STREAM_DRAW);
     2328        );
    23252329
    23262330    GLvoid *buf = vboxglMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
    2327 
    2328 //  updateBuffer((uchar*)buf, &mRect);
    2329     memcpy(buf, mAddress, memSize());
    2330 
    2331     bool unmapped = vboxglUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
    2332     Assert(unmapped); NOREF(unmapped);
     2331    Assert(buf);
     2332    if(buf)
     2333    {
     2334    //  updateBuffer((uchar*)buf, &mRect);
     2335        memcpy(buf, mAddress, memSize());
     2336
     2337        bool unmapped = vboxglUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
     2338        Assert(unmapped); NOREF(unmapped);
     2339    }
    23332340
    23342341    vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
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