VirtualBox

Changeset 24378 in vbox for trunk/src


Ignore:
Timestamp:
Nov 5, 2009 11:37:15 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL-OSX: check for a valid region

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c

    r21785 r24378  
    794794        SectRgn(rgn, window->hVisibleRegion, rgn);
    795795
    796     /* Set the clip region to the context */
    797     result = render_spu.ws.aglSetInteger(c->context, AGL_CLIP_REGION, (const GLint*)rgn);
    798     CHECK_AGL_RC (result, "Render SPU (renderspu_SystemWindowVisibleRegion): SetInteger Failed");
    799     result = render_spu.ws.aglEnable(c->context, AGL_CLIP_REGION);
    800     CHECK_AGL_RC (result, "Render SPU (renderspu_SystemWindowVisibleRegion): Enable Failed");
     796    if (rgn && !EmptyRgn(rgn))
     797    {
     798        /* Set the clip region to the context */
     799        result = render_spu.ws.aglSetInteger(c->context, AGL_CLIP_REGION, (const GLint*)rgn);
     800        CHECK_AGL_RC (result, "Render SPU (renderspu_SystemWindowVisibleRegion): SetInteger Failed");
     801        result = render_spu.ws.aglEnable(c->context, AGL_CLIP_REGION);
     802        CHECK_AGL_RC (result, "Render SPU (renderspu_SystemWindowVisibleRegion): Enable Failed");
     803    }
    801804    /* Clear the region structure */
    802805    DisposeRgn (rgn);
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