JVM crash fix!
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Fri, 23 Oct 2009 14:14:05 +0000 (18:14 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Fri, 23 Oct 2009 14:14:05 +0000 (18:14 +0400)
platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java

index a069a5f0966395b6441542b5853ce5f980014c46..6a068d3eec5cdd9c4b5922a4f5f7bee1a24fb8a2 100644 (file)
@@ -21,6 +21,7 @@ import com.intellij.openapi.components.ApplicationComponent;
 import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.util.SystemInfo;
 import com.intellij.openapi.util.io.FileUtil;
+import com.intellij.openapi.util.registry.Registry;
 import com.intellij.openapi.vfs.JarFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.openapi.vfs.impl.win32.Win32Kernel;
@@ -124,7 +125,7 @@ public final class LocalFileSystemImpl extends LocalFileSystemBase implements Ap
   }
 
   public void disposeComponent() {
-    if (SystemInfo.isWindows) {
+    if (SystemInfo.isWindows && Registry.is("filesystem.useNative")) {
       Win32Kernel.release();
     }
   }