VirtualBox

Ignore:
Timestamp:
May 17, 2010 1:41:20 PM (15 years ago)
Author:
vboxsync
Message:

Main: better handle null shapes

File:
1 edited

Legend:

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

    r29518 r29542  
    107107        com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape));
    108108        size_t cbShapeSize = aShape.size();
    109         shape.resize(cbShapeSize);
    110         ::memcpy(shape.raw(), aShape.raw(), cbShapeSize);
     109        if (cbShapeSize > 0)
     110        {
     111            shape.resize(cbShapeSize);
     112            ::memcpy(shape.raw(), aShape.raw(), cbShapeSize);
     113        }
    111114    }
    112115
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