diff --git a/java/testFramework/src/com/intellij/testFramework/fixtures/LightJavaCodeInsightFixtureTestCase.java b/java/testFramework/src/com/intellij/testFramework/fixtures/LightJavaCodeInsightFixtureTestCase.java index 813f23a2437c..f985c93ce8fa 100644 --- a/java/testFramework/src/com/intellij/testFramework/fixtures/LightJavaCodeInsightFixtureTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/fixtures/LightJavaCodeInsightFixtureTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.testFramework.fixtures; import com.intellij.lang.Language; @@ -133,7 +133,9 @@ public abstract class LightJavaCodeInsightFixtureTestCase extends UsefulTestCase @Override protected void tearDown() throws Exception { try { - myFixture.tearDown(); + if (myFixture != null) { + myFixture.tearDown(); + } } catch (Throwable e) { addSuppressedException(e);