fix NPE on teardown

GitOrigin-RevId: 1fbdd1323db3f4207231cfcc42754549a3ced644
This commit is contained in:
Vladimir Krivosheev
2023-12-18 09:50:35 +00:00
committed by intellij-monorepo-bot
parent ce431c5bc1
commit e28f07dd84
@@ -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);