VirtualBox

Changeset 2729 in vbox for trunk/src


Ignore:
Timestamp:
May 21, 2007 12:13:01 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
21328
Message:

FE/SDL: fixed two potential races when terminating the VM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r2540 r2729  
    278278#ifdef VBOX_SECURELABEL
    279279        Assert(key);
    280         /*
    281          * check if we're interested in the message
    282          */
    283         Guid ourGuid;
    284         Guid messageGuid = machineId;
    285         gMachine->COMGETTER(Id)(ourGuid.asOutParam());
    286         if (ourGuid == messageGuid)
    287         {
    288             Bstr keyString = key;
    289             if (keyString && keyString == VBOXSDL_SECURELABEL_EXTRADATA)
    290             {
    291                 /*
    292                  * Notify SDL thread of the string update
    293                  */
    294                 SDL_Event event  = {0};
    295                 event.type       = SDL_USEREVENT;
    296                 event.user.type  = SDL_USER_EVENT_SECURELABEL_UPDATE;
    297                 int rc = SDL_PushEvent(&event);
    298                 NOREF(rc);
    299                 AssertMsg(!rc, ("SDL_PushEvent returned with SDL error '%s'\n", SDL_GetError()));
     280        if (gMachine)
     281        {
     282            /*
     283             * check if we're interested in the message
     284             */
     285            Guid ourGuid;
     286            Guid messageGuid = machineId;
     287            gMachine->COMGETTER(Id)(ourGuid.asOutParam());
     288            if (ourGuid == messageGuid)
     289            {
     290                Bstr keyString = key;
     291                if (keyString && keyString == VBOXSDL_SECURELABEL_EXTRADATA)
     292                {
     293                    /*
     294                     * Notify SDL thread of the string update
     295                     */
     296                    SDL_Event event  = {0};
     297                    event.type       = SDL_USEREVENT;
     298                    event.user.type  = SDL_USER_EVENT_SECURELABEL_UPDATE;
     299                    int rc = SDL_PushEvent(&event);
     300                    NOREF(rc);
     301                    AssertMsg(!rc, ("SDL_PushEvent returned with SDL error '%s'\n", SDL_GetError()));
     302                }
    300303            }
    301304        }
     
    25012504
    25022505    LogFlow(("Releasing mouse, keyboard, vrdpserver, display, console...\n"));
     2506    gDisplay->SetupInternalFramebuffer(0);
    25032507    gMouse = NULL;
    25042508    gKeyboard = NULL;
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