Fix exception with character implants, and don't show implant set menu if there aren't any (#1172)

This commit is contained in:
Ryan Holmes
2017-05-15 22:59:47 -04:00
committed by GitHub
parent 89b508d0f6
commit 65f71b6f6b
2 changed files with 17 additions and 0 deletions

View File

@@ -18,6 +18,12 @@ class ImplantSets(ContextMenu):
if not self.settings.get('implantSets'):
return False
sIS = s_ImplantSets.getInstance()
implantSets = sIS.getImplantSetList()
if len(implantSets) == 0:
return False
return srcContext in ("implantView", "implantEditor")
def getText(self, itmContext, selection):