@@ -770,6 +770,10 @@ impl ProcessingSession {
770
770
return Err ( ErrorKind :: Msg ( "cannot create formats without using a bundle" . to_owned ( ) ) . into ( ) )
771
771
}
772
772
773
+ if self . io . format_cache . is_none ( ) {
774
+ return Err ( ErrorKind :: Msg ( "cannot create formats having a place to save them" . to_owned ( ) ) . into ( ) )
775
+ }
776
+
773
777
// PathBuf.file_stem() doesn't do what we want since it only strips
774
778
// one extension. As of 1.17, the compiler needs a type annotation for
775
779
// some reason, which is why we use the `r` variable.
@@ -804,7 +808,7 @@ impl ProcessingSession {
804
808
// principle we could stream the format file directly to the staging
805
809
// area as we ran the TeX engine, but we don't bother.
806
810
807
- let bundle = & mut * self . io . bundle . as_mut ( ) . unwrap ( ) ;
811
+ let format_cache = & mut * self . io . format_cache . as_mut ( ) . unwrap ( ) ;
808
812
809
813
for ( name, contents) in & * self . io . mem . files . borrow ( ) {
810
814
if name == self . io . mem . stdout_key ( ) {
@@ -818,7 +822,7 @@ impl ProcessingSession {
818
822
}
819
823
820
824
// Note that we intentionally pass 'stem', not 'name'.
821
- ctry ! ( bundle . write_format( stem, contents, status) ; "cannot write format file {}" , sname) ;
825
+ ctry ! ( format_cache . write_format( stem, contents, status) ; "cannot write format file {}" , sname) ;
822
826
}
823
827
824
828
// All done. Clear the memory layer since this was a special preparatory step.
0 commit comments