VirtualBox

Ignore:
Timestamp:
May 6, 2016 2:05:29 PM (9 years ago)
Author:
vboxsync
Message:

QtGui: Don't statically instantiate CComModule, it will start using IPRT before we've initialized it! (At least in non-hardened builds.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r60783 r60862  
    181181
    182182#ifdef VBOX_WS_WIN
    183 /* Make sure that ATL is usable in this linking namespace. */
    184 static ATL::CComModule _Module;
    185 #endif /* VBOX_WS_WIN */
     183/** ATL requires a module to be instantiated (set internal global variable).
     184 * @note Do NOT do this statically as it starts using IPRT before it's ready! */
     185static ATL::CComModule *_Module;
     186#endif
    186187
    187188/* static */
     
    202203    /* Create instance: */
    203204    new VBoxGlobal;
     205#ifdef VBOX_WS_WIN
     206    _Module = new ATL::CComModule;
     207#endif
    204208    /* Prepare instance: */
    205209    m_spInstance->prepare();
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