VirtualBox

Changeset 7446 in vbox


Ignore:
Timestamp:
Mar 13, 2008 8:17:06 PM (17 years ago)
Author:
vboxsync
Message:

Additions/x11: added a check for a null pointer which should prevent a segfault

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/xclient/seamless-x11.cpp

    r7106 r7446  
    224224
    225225    windowTypeRaw = XXGetProperty(mDisplay, hWin, XA_ATOM, WM_TYPE_PROP, &ulCount);
    226     windowType = reinterpret_cast<Atom *>(windowTypeRaw);
    227     if (   (ulCount != 0)
    228         && (*windowType == XInternAtom(mDisplay, WM_TYPE_DESKTOP_PROP, True)))
    229         rc = true;
     226    if (windowTypeRaw != NULL)
     227    {
     228        windowType = reinterpret_cast<Atom *>(windowTypeRaw);
     229        if (   (ulCount != 0)
     230            && (*windowType == XInternAtom(mDisplay, WM_TYPE_DESKTOP_PROP, True)))
     231            rc = true;
     232    }
    230233    return rc;
    231234}
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