[Whatsnext] check if db is open (#651)

Fixes #10732
This commit is contained in:
Ivan 2018-09-04 07:38:42 +06:00 committed by Sam Manzi
parent 224748eb96
commit 7d9f4dcc80

View File

@ -93,6 +93,7 @@ class WhatNextGramplet(Gramplet):
self.opts[3].add_item('', '')
self.opts[4].add_item('', '')
self.opts[5].add_item('', '')
if self.dbstate.db.is_open():
for tag_handle in self.dbstate.db.get_tag_handles(sort_handles=True):
tag = self.dbstate.db.get_tag_from_handle(tag_handle)
tag_name = tag.get_name()