Explorar el Código

Fix race condition in kernel indicator disposal

Steven Silvester hace 8 años
padre
commit
afd3f21110
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/notebook/notebook/default-toolbar.ts

+ 3 - 0
src/notebook/notebook/default-toolbar.ts

@@ -430,6 +430,9 @@ class KernelIndicator extends Widget {
    * Handle a status on a kernel.
    */
   private _handleStatus(kernel: IKernel, status: IKernel.Status) {
+    if (this.isDisposed) {
+      return;
+    }
     this.toggleClass(TOOLBAR_BUSY, status !== 'idle');
     let title = 'Kernel ' + status[0].toUpperCase() + status.slice(1);
     this.node.title = title;