# --------------------------------------------
# 04/07/09	tcl@bluepeak.home	1.179
# Fixed [Tcllib SF Bug 988123], doc generation. Cleanup in loop when encountering a module without documentation.
# --------------------------------------------
#
diff -Nru a/ChangeLog b/ChangeLog
--- a/ChangeLog	Fri Jul  9 21:06:43 2004
+++ b/ChangeLog	Fri Jul  9 21:06:43 2004
@@ -1,3 +1,10 @@
+2004-07-09  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
+
+	* sak.tcl: Fixed [Tcllib SF Bug 988123], which caused the doctools
+	  converter to fail if one run a module without documentation was
+	  followed by a module having documentation. Found by Reinhard Max
+	  <max@suse.de>.
+
 2004-07-09  Reinhard Max  <max@suse.de>
 
 	* installed_modules.tcl: NEW MODULE: ident
diff -Nru a/sak.tcl b/sak.tcl
--- a/sak.tcl	Fri Jul  9 21:06:43 2004
+++ b/sak.tcl	Fri Jul  9 21:06:43 2004
@@ -212,7 +212,11 @@
 		-module $m
 
 	set fl [glob -nocomplain [file join $distribution modules $m *.man]]
-	if {[llength $fl] == 0} {continue}
+
+	if {[llength $fl] == 0} {
+	    dt destroy
+	    continue
+	}
 
 	foreach f $fl {
 	    if {!$null} {
