more robust, e.g. for "isabelle dump";
authorwenzelm
Mon, 17 Oct 2022 22:39:44 +0200
changeset 76330 0749f4d4b5be
parent 76329 cdef2c8beccf
child 76331 bc4f902d2b0d
more robust, e.g. for "isabelle dump";
src/Pure/PIDE/headless.scala
--- a/src/Pure/PIDE/headless.scala	Mon Oct 17 22:32:19 2022 +0200
+++ b/src/Pure/PIDE/headless.scala	Mon Oct 17 22:39:44 2022 +0200
@@ -357,7 +357,7 @@
         val delay_commit_clean =
           Delay.first(commit_cleanup_delay max Time.zero) {
             val clean_theories = use_theories_state.change_result(_.clean_theories)
-            if (clean_theories.nonEmpty) {
+            if (clean_theories.nonEmpty && session.is_ready) {
               progress.echo("Removing " + clean_theories.length + " theories ...")
               resources.clean_theories(session, id, clean_theories)
             }