VirtualBox

Changeset 32136 in vbox


Ignore:
Timestamp:
Aug 31, 2010 12:24:38 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt: Problem Reporter: Fixed segfaults while trying to acquire data from (or just delete) QIMessageBox already deleted by it's parent.

File:
1 edited

Legend:

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

    r31563 r32136  
    199199    }
    200200
    201     QIMessageBox *box = new QIMessageBox (title, aMessage, icon, aButton1, aButton2,
    202                                           aButton3, aParent, aAutoConfirmId);
     201    QPointer<QIMessageBox> box = new QIMessageBox (title, aMessage, icon, aButton1, aButton2,
     202                                                   aButton3, aParent, aAutoConfirmId);
    203203
    204204    if (!aText1.isNull())
     
    222222    if (aAutoConfirmId)
    223223    {
    224         if (box->isFlagChecked())
     224        if (box && box->isFlagChecked())
    225225        {
    226226            msgs << aAutoConfirmId;
     
    229229    }
    230230
    231     delete box;
     231    if (box)
     232        delete box;
    232233
    233234    return rc;
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