more robust handling of uninitialized value, notably Build_Process.progress;
authorwenzelm
Mon, 04 Mar 2024 20:49:46 +0100
changeset 79767 52b5c7c8e6d9
parent 79766 feec445a82c3
child 79768 7e05515cadc0
more robust handling of uninitialized value, notably Build_Process.progress;
src/Pure/General/logger.scala
--- a/src/Pure/General/logger.scala	Mon Mar 04 19:14:16 2024 +0100
+++ b/src/Pure/General/logger.scala	Mon Mar 04 20:49:46 2024 +0100
@@ -12,7 +12,7 @@
     log_file match { case Some(file) => new File_Logger(file) case None => No_Logger }
 
   def make(progress: Progress): Logger =
-    new Logger { def apply(msg: => String): Unit = progress.echo(msg) }
+    new Logger { def apply(msg: => String): Unit = if (progress != null) progress.echo(msg) }
 
   def make_system_log(progress: Progress, options: Options): Logger =
     options.string("system_log") match {