Gnus v5.6.20.
[elisp/gnus.git-] / lisp / gnus-sum.el
index 1bb146a..7b53900 100644 (file)
@@ -3258,13 +3258,13 @@ If LINE, insert the rebuilt thread starting on line LINE."
        (headers in-headers)
        references)
     (while (and parent
-               headers
                (not (zerop generation))
                (setq references (mail-header-references headers)))
-      (when (and references
-                (setq parent (gnus-parent-id references))
-                (setq headers (car (gnus-id-to-thread parent))))
-       (decf generation)))
+      (setq headers (if (and references
+                            (setq parent (gnus-parent-id references)))
+                       (car (gnus-id-to-thread parent))
+                     nil))
+      (decf generation))
     (and (not (eq headers in-headers))
         headers)))