Changeset 29542 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 17, 2010 1:41:20 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r29518 r29542 107 107 com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape)); 108 108 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 } 111 114 } 112 115 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r29518 r29542 216 216 com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape)); 217 217 size_t cbShapeSize = aShape.size(); 218 shape.resize(cbShapeSize); 219 ::memcpy(shape.raw(), aShape.raw(), cbShapeSize); 218 if (cbShapeSize > 0) 219 { 220 shape.resize(cbShapeSize); 221 ::memcpy(shape.raw(), aShape.raw(), cbShapeSize); 222 } 220 223 } 221 224 ~MousePointerChangeEvent() … … 228 231 uint width() const { return w; } 229 232 uint height() const { return h; } 230 const uchar *shapeData() const { return shape. raw(); }233 const uchar *shapeData() const { return shape.size() > 0 ? shape.raw() : NULL; } 231 234 private: 232 235 bool vis, alph; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r29518 r29542 60 60 { 61 61 com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape)); 62 size_t cbShapeSize = aShape.size(); 63 m_shape.resize(cbShapeSize); 64 ::memcpy(m_shape.raw(), aShape.raw(), cbShapeSize); 62 size_t cbShapeSize = aShape.size(); 63 if (cbShapeSize > 0) 64 { 65 m_shape.resize(cbShapeSize); 66 ::memcpy(m_shape.raw(), aShape.raw(), cbShapeSize); 67 } 65 68 } 66 69 … … 75 78 uint width() const { return m_uWidth; } 76 79 uint height() const { return m_uHeight; } 77 const uchar *shapeData() const { return m_shape. raw(); }80 const uchar *shapeData() const { return m_shape.size() > 0 ? m_shape.raw() : NULL; } 78 81 79 82 private:
Note:
See TracChangeset
for help on using the changeset viewer.