Fix fatal in topic history.

Bug: 65051
Change-Id: I362ab38dd79658ee98b3db8f9bf6ee52508fa634
(cherry picked from commit 6a1c7043982c0d7b644fea31e0ac4a82affbc625)