VirtualBox

Changeset 53324 in vbox


Ignore:
Timestamp:
Nov 13, 2014 3:19:16 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7556: Subsequent try to fix the crash in VM selector: Details pane: VM preview.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp

    r53238 r53324  
    259259                        break;
    260260
     261                    /* Make sure screen-data size is valid: */
     262                    const int iExpectedSize = size.width() * size.height() * 4;
     263                    const int iActualSize = screenData.size();
     264                    if (iActualSize != iExpectedSize)
     265                    {
     266                        AssertMsgFailed(("Invalid screen-data size '%d', should be '%d'!\n", iActualSize, iExpectedSize));
     267                        break;
     268                    }
     269
    261270                    /* Create image based on shallow copy of acquired data: */
    262                     image = QImage(screenData.data(), size.width(), size.height(), QImage::Format_RGB32);
     271                    QImage tempImage(screenData.data(), size.width(), size.height(), QImage::Format_RGB32);
     272                    image = tempImage;
    263273                    /* And detach that copy to make it deep: */
    264274                    image.detach();
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