diff options
Diffstat (limited to 'src/VBox/Devices/Storage/DrvMediaISO.cpp')
| -rw-r--r-- | src/VBox/Devices/Storage/DrvMediaISO.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/VBox/Devices/Storage/DrvMediaISO.cpp b/src/VBox/Devices/Storage/DrvMediaISO.cpp index f5fc8d24..c18a9dd2 100644 --- a/src/VBox/Devices/Storage/DrvMediaISO.cpp +++ b/src/VBox/Devices/Storage/DrvMediaISO.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -196,8 +196,11 @@ static DECLCALLBACK(void) drvMediaISODestruct(PPDMDRVINS pDrvIns) LogFlow(("drvMediaISODestruct: '%s'\n", pThis->pszFilename)); PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); - RTFileClose(pThis->hFile); - pThis->hFile = NIL_RTFILE; + if (pThis->hFile != NIL_RTFILE) + { + RTFileClose(pThis->hFile); + pThis->hFile = NIL_RTFILE; + } if (pThis->pszFilename) { |
