userlibandfileserver/fileserver/sfile/sf_local.cpp
branchRCL_3
changeset 36 bbf8bed59bcb
parent 0 a41df078684a
child 41 0ffb4e86fcc9
--- a/userlibandfileserver/fileserver/sfile/sf_local.cpp	Tue May 25 14:09:55 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_local.cpp	Wed Jun 09 11:10:19 2010 +0300
@@ -386,7 +386,8 @@
 	__ASSERT_ALWAYS(aDrive>=0 && aDrive<KMaxDrives,Fault(EClearProxyDriveMapping1));
 	__ASSERT_DEBUG(iMapping[aDrive]>= KMaxLocalDrives && iProxyDriveMapping[iMapping[aDrive]-KMaxLocalDrives],Fault(EClearProxyDriveMapping2));
 	TInt idx = iMapping[aDrive]-KMaxLocalDrives;
-	delete iProxyDriveMapping[idx];
+	if (iProxyDriveMapping[idx]->Mount() == NULL)	// don't delete if it's still owned by its mount
+		delete iProxyDriveMapping[idx];
 	iProxyDriveMapping[idx] = NULL;
 	iMapping[aDrive] = KDriveInvalid;
 	}