Don't crash when children not viewable.

This commit is contained in:
Neil Williams
2011-04-27 15:44:53 -07:00
parent 2c3379c5e3
commit 4007764965

View File

@@ -345,7 +345,7 @@ class _MessageBuilder(Builder):
if children:
# if no parent is specified, check if any of the messages are
# uncollapsed, and truncate the thread
children = [wrapped[child] for child in children]
children = [wrapped[child] for child in children if child in wrapped]
parent.child = empty_listing()
# if the parent is new, uncollapsed, or focal we don't
# want it to become a moremessages wrapper.