gbranden pushed a commit to branch master
in repository groff.

commit 700297b3505fa3d949e3e55da05e46e064c63c0c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Nov 21 12:09:40 2026 -0600

    [troff]: Drop an assert(3) call.
    
    * src/roff/troff/div.cpp (write_any_trailer_and_exit): Drop assert(3)
      call.  A top-level diversion does not exist at formatter exit if the
      program cannot locate and load a device description file.  This
      scenario is a fatal error but a valid scenario.
---
 ChangeLog              | 8 ++++++++
 src/roff/troff/div.cpp | 1 -
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f964477a6..e376b7085 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-11-21  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/div.cpp (write_any_trailer_and_exit): Drop
+       assert(3) call.  A top-level diversion does not exist at
+       formatter exit if the program cannot locate and load a device
+       description file.  This scenario is a fatal error but a valid
+       scenario.
+
 2026-11-20  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (environment::dump): Rearrange report
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index ef4d2928c..8d5e35a55 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -658,7 +658,6 @@ void end_diversions()
 // input.cpp:exit_troff() cleans up most formatter state.
 void write_any_trailer_and_exit(int exit_code)
 {
-  assert(topdiv != 0 /* nullptr */);
   // If output was never initialized, there is no trailer to write.
   if (the_output != 0 /* nullptr */) {
     if (topdiv != 0 /* nullptr */) // NDEBUG

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to