- Timestamp:
- Sep 23, 2009 8:12:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r23223 r23245 1977 1977 { 1978 1978 Medium *pMedium = pAttachTemp->medium(); 1979 AutoReadLock mediumLock(pMedium); 1980 return setError(VBOX_E_OBJECT_IN_USE, 1981 tr("Medium '%ls' is already attached to device slot %d on port %d of controller '%ls' of this virtual machine"), 1982 pMedium->locationFull().raw(), aDevice, aControllerPort, aControllerName); 1979 if (pMedium) 1980 { 1981 AutoReadLock mediumLock(pMedium); 1982 return setError(VBOX_E_OBJECT_IN_USE, 1983 tr("Medium '%ls' is already attached to device slot %d on port %d of controller '%ls' of this virtual machine"), 1984 pMedium->locationFull().raw(), aDevice, aControllerPort, aControllerName); 1985 } 1986 else 1987 return setError(VBOX_E_OBJECT_IN_USE, 1988 tr("Device is already attached to slot %d on port %d of controller '%ls' of this virtual machine"), 1989 aDevice, aControllerPort, aControllerName); 1983 1990 } 1984 1991 … … 2071 2078 AutoWriteLock mediumLock(medium); 2072 2079 2073 if ( (pAttachTemp = findAttachment(mMediaData->mAttachments,2074 medium)))2080 if ( (pAttachTemp = findAttachment(mMediaData->mAttachments, medium)) 2081 && !medium.isNull()) 2075 2082 { 2076 2083 return setError(VBOX_E_OBJECT_IN_USE,
Note:
See TracChangeset
for help on using the changeset viewer.