VirtualBox

Changeset 24142 in vbox


Ignore:
Timestamp:
Oct 28, 2009 3:10:34 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54068
Message:

GuestHost and HostServices/SharedClipboard/x11: fix a crash when clipboard initialisation fails

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp

    r22237 r24142  
    640640#ifndef TESTCASE
    641641    if (RT_SUCCESS(rc))
     642    {
    642643        rc = clipLoadXFixes(pDisplay, pCtx);
     644        if (RT_FAILURE(rc))
     645           LogRel(("Shared clipboard: failed to load the XFIXES extension.\n"));
     646    }
    643647#endif
    644648    if (RT_SUCCESS(rc))
     
    682686            && (fcntl(pCtx->wakeupPipeRead, F_SETFL, O_NONBLOCK) != 0))
    683687            rc = RTErrConvertFromErrno(errno);
     688        if (RT_FAILURE(rc))
     689            LogRel(("Shared clipboard: failed to setup the termination mechanism.\n"));
    684690    }
    685691    else
     
    687693    if (RT_FAILURE(rc))
    688694        clipUninit(pCtx);
     695    if (RT_FAILURE(rc))
     696        LogRel(("Shared clipboard: initialisation failed: %Rrc\n", rc));
    689697    return rc;
    690698}
     
    765773                            RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "SHCLIP");
    766774        if (RT_FAILURE(rc))
    767             LogRel(("Failed to initialise the shared clipboard X11 backend.\n"));
     775        {
     776            LogRel(("Failed to start the shared clipboard thread.\n"));
     777            clipUninit(pCtx);
     778        }
    768779    }
    769780#endif
  • trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp

    r22181 r24142  
    125125            rc = ClipStartX11(pBackend, true /* grab shared clipboard */);
    126126        }
    127         if (RT_FAILURE(rc) && pBackend)
    128             ClipStopX11(pCtx->pBackend);
    129127        if (RT_FAILURE(rc))
    130128            RTCritSectDelete(&pCtx->clipboardMutex);
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