VirtualBox

Changeset 70370 in vbox for trunk/src


Ignore:
Timestamp:
Dec 27, 2017 6:36:30 PM (7 years ago)
Author:
vboxsync
Message:

VBVADestroy: Need to check if pHGSMI is NULL _before_ passing it to HGSMIContext, as it won't doing any checking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r70077 r70370  
    29672967}
    29682968
    2969 void VBVADestroy (PVGASTATE pVGAState)
    2970 {
    2971     VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext (pVGAState->pHGSMI);
    2972 
    2973     if (pCtx)
    2974     {
     2969void VBVADestroy(PVGASTATE pVGAState)
     2970{
     2971    PHGSMIINSTANCE pHgsmi = pVGAState->pHGSMI;
     2972    if (pHgsmi)
     2973    {
     2974        VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext(pHgsmi);
    29752975        pCtx->mouseShapeInfo.fSet = false;
    29762976        RTMemFree(pCtx->mouseShapeInfo.pu8Shape);
     
    29782978        pCtx->mouseShapeInfo.cbAllocated = 0;
    29792979        pCtx->mouseShapeInfo.cbShape = 0;
    2980     }
    2981 
    2982     HGSMIDestroy (pVGAState->pHGSMI);
    2983     pVGAState->pHGSMI = NULL;
    2984 }
     2980
     2981        HGSMIDestroy(pHgsmi);
     2982        pVGAState->pHGSMI = NULL;
     2983    }
     2984}
     2985
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