VirtualBox

Changeset 47916 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Aug 20, 2013 2:01:53 PM (11 years ago)
Author:
vboxsync
Message:

Main/Machine: fix the code which sets custom icons, and also fix loading of settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r47915 r47916  
    75937593            mUserData.backup();
    75947594            com::SafeArray<BYTE> icon(ComSafeArrayInArg(aIcon));
    7595             mUserData->mIcon.clear();
     7595            mUserData->mIcon.resize(icon.size());
    75967596            memcpy(&mUserData->mIcon[0], icon.raw(), mUserData->mIcon.size());
    75977597         }
     
    89318931{
    89328932    // copy name, description, OS type, teleporter, UTC etc.
     8933    mUserData->s = config.machineUserData;
     8934
     8935    // Decode the Icon overide data from config userdata and set onto Machine.
    89338936    #define DECODE_STR_MAX _1M
    8934     mUserData->s = config.machineUserData;
    8935 
    8936     // Decode the Icon overide data from config userdata and set onto Machine.
    89378937    const char* pszStr = config.machineUserData.ovIcon.c_str();
    89388938    ssize_t cbOut = RTBase64DecodedSize(pszStr, NULL);
     
    89498949                        pszStr,
    89508950                        rc);
    8951     COMSETTER(Icon)(ComSafeArrayAsInParam(iconByte));
     8951    mUserData->mIcon.resize(iconByte.size());
     8952    memcpy(&mUserData->mIcon[0], iconByte.raw(), mUserData->mIcon.size());
    89528953
    89538954    // look up the object by Id to check it is valid
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