VirtualBox

Changeset 34284 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Nov 23, 2010 1:38:39 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68035
Message:

crOpenGL: check call return values and add warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/context.c

    r34236 r34284  
    515515    }
    516516    else {
    517         GetClientRect( hwnd, &rect );
     517        if (!GetClientRect(hwnd, &rect))
     518        {
     519            crWarning("GetClientRect failed for %p", hwnd);
     520            *w = *h = 0;
     521            return;
     522        }
    518523        *w = rect.right - rect.left;
    519524        *h = rect.bottom - rect.top;
    520         ClientToScreen( hwnd, (LPPOINT) &rect );
     525        if (!ClientToScreen( hwnd, (LPPOINT) &rect ))
     526        {
     527            crWarning("ClientToScreen failed for %p", hwnd);
     528            *w = *h = 0;
     529            return;
     530        }
    521531        *x = rect.left;
    522532        *y = rect.top;
Note: See TracChangeset for help on using the changeset viewer.

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