Changeset 25027 in vbox
- Timestamp:
- Nov 26, 2009 5:59:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r25016 r25027 659 659 } 660 660 661 ComPtr<IVirtualBox> virtualBox; 662 ComPtr<ISession> session; 663 bool fSessionOpened = false; 664 661 665 do 662 666 { 663 ComPtr<IVirtualBox> virtualBox;664 ComPtr<ISession> session;665 666 667 rc = virtualBox.createLocalObject(CLSID_VirtualBox); 667 668 if (FAILED(rc)) … … 708 709 // open a session 709 710 CHECK_ERROR_BREAK(virtualBox, OpenSession (session, id)); 711 fSessionOpened = true; 710 712 711 713 /* get the console */ … … 762 764 if (rc != S_OK) 763 765 { 764 return -1;766 break; 765 767 } 766 768 #endif /* defined(VBOX_FFMPEG) */ … … 784 786 { 785 787 RTPrintf("Error: could not create framebuffer object %d\n", uScreenId); 786 return -1;788 break; 787 789 } 788 790 pVRDPFramebuffer->AddRef(); 789 791 display->SetFramebuffer(uScreenId, pVRDPFramebuffer); 792 } 793 if (uScreenId < cMonitors) 794 { 795 break; 790 796 } 791 797 #endif … … 955 961 956 962 /* we don't have to disable VRDP here because we don't save the settings of the VM */ 957 963 } 964 while (0); 965 966 if (fSessionOpened) 967 { 958 968 /* 959 969 * Close the session. This will also uninitialize the console and … … 963 973 session->Close(); 964 974 } 965 while (0); 975 976 /* Must be before com::Shutdown */ 977 session.setNull(); 978 virtualBox.setNull(); 966 979 967 980 com::Shutdown();
Note:
See TracChangeset
for help on using the changeset viewer.

