VirtualBox

Changeset 97738 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Dec 5, 2022 8:17:08 AM (2 years ago)
Author:
vboxsync
Message:

DnD/VBoxClient: Check for a potentially valid window handle in DragInstance::wndX11GetNameA() before calling the X server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp

    r97737 r97738  
    28142814 *
    28152815 * @returns Pointer to the allocated window name.
     2816 * @retval  NULL on allocation failure.
     2817 * @retval  "<No name>" if window name was not found / invalid window handle.
    28162818 * @param   wndThis                 Window to retrieve name for.
    2817  *
    2818  * @remark If the window title is not available, the text
    2819  *         "<No name>" will be returned.
    28202819 */
    28212820char *DragInstance::wndX11GetNameA(Window wndThis) const
     
    28242823
    28252824    XTextProperty propName;
    2826     if (XGetWMName(m_pDisplay, wndThis, &propName))
     2825    if (   wndThis != None
     2826        && XGetWMName(m_pDisplay, wndThis, &propName))
    28272827    {
    28282828        if (propName.value)
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