Fix #976727 (Right-click error)

This commit is contained in:
Kovid Goyal
2012-04-09 09:15:15 +05:30
parent 80519030fd
commit d2dcaf2961
2 changed files with 4 additions and 1 deletions
@@ -177,7 +177,7 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
ca.triggered.connect(self.paste_from_clipboard)
m.addSeparator()
if self.context_item.column() == 0:
if self.context_item is not None and self.context_item.column() == 0:
ca = m.addAction(_('Copy to author sort'))
ca.triggered.connect(self.copy_au_to_aus)
else:
@@ -108,6 +108,9 @@ class UserProfiles(ResizableDialog, Ui_Dialog):
def show_recipe_files(self, *args):
bdir = os.path.dirname(custom_recipes.file_path)
if not os.path.exists(bdir):
return error_dialog(self, _('No recipes'),
_('No custom recipes created.'), show=True)
open_local_file(bdir)
def break_cycles(self):