VirtualBox

Ignore:
Timestamp:
Apr 7, 2015 1:50:03 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: UIMessageCenter.cpp: Fixed QPixmap memory leak.

File:
1 edited

Legend:

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

    r54937 r55115  
    337337{
    338338    /* Prepare pixmap: */
    339     QPixmap *pPixmap = 0;
     339    QPixmap *pPixmap = NULL;
    340340    if (!strImage.isEmpty())
    341341        pPixmap = new QPixmap(strImage);
     
    350350
    351351    /* Make sure progress-dialog still valid: */
    352     if (!pProgressDlg)
    353         return false;
    354 
    355     /* Delete progress-dialog: */
    356     delete pProgressDlg;
     352    bool fRc;
     353    if (pProgressDlg)
     354    {
     355        /* Delete progress-dialog: */
     356        delete pProgressDlg;
     357
     358        fRc = true;
     359    }
     360    else
     361        fRc = false;
    357362
    358363    /* Cleanup pixmap: */
     
    360365        delete pPixmap;
    361366
    362     return true;
     367    return fRc;
    363368}
    364369
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