IJPL-73122 vcs: add warning for a disposed thread

GitOrigin-RevId: 0e220a941c26e3fe4dfbf657e88eba3a633b1bc5
This commit is contained in:
Aleksey Pivovarov
2024-05-28 15:18:24 +02:00
committed by intellij-monorepo-bot
parent cf27486248
commit de57572948

View File

@@ -2,6 +2,7 @@
package com.intellij.openapi.vcs;
import com.intellij.notification.*;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.NlsContexts.NotificationContent;
import com.intellij.openapi.util.NlsContexts.NotificationTitle;
@@ -39,6 +40,7 @@ public class VcsNotifier {
@NotNull
public Notification notify(@NotNull Notification notification) {
if (myProject.isDisposed()) Logger.getInstance(VcsNotifier.class).warn("Project is already disposed: " + notification);
notification.notify(myProject);
return notification;
}