From 6e41cff15101897f89ab2c5919f505b9cc7c0848 Mon Sep 17 00:00:00 2001 From: Vadim Salavatov Date: Mon, 29 Jul 2024 12:49:56 +0200 Subject: [PATCH] IJPL-158517 fix NPE in coroutineDumper GitOrigin-RevId: 34b97b0d45a90d8fbdab47e6bfe417f389057ef0 --- .../util/base/src/com/intellij/diagnostic/coroutineDumper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/util/base/src/com/intellij/diagnostic/coroutineDumper.kt b/platform/util/base/src/com/intellij/diagnostic/coroutineDumper.kt index fec643e9cf06..5af91087f9dc 100644 --- a/platform/util/base/src/com/intellij/diagnostic/coroutineDumper.kt +++ b/platform/util/base/src/com/intellij/diagnostic/coroutineDumper.kt @@ -267,7 +267,7 @@ private fun JobTree.toRepresentation(stripTrace: Boolean): JobRepresentationTree job is CoroutineScope -> job.coroutineContext debugInfo !== null -> debugInfo.context else -> EmptyCoroutineContext - } + } ?: EmptyCoroutineContext // shouldn't be necessary but see IJPL-158517 val name = if (job is AbstractCoroutine<*> && DEBUG) { // in DEBUG the name is displayed as part of `job.toString()` for AbstractCoroutine // see kotlinx.coroutines.AbstractCoroutine.nameString