Skip to content

Commit

Permalink
fix: TypeError when get_highlight return None
Browse files Browse the repository at this point in the history
  • Loading branch information
zeze-zeze committed Oct 8, 2022
1 parent 9a92e69 commit f0586f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LazyIDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ def activate(self, ctx):
copy_to_clip("0x%X" % ea)
print("Address 0x%X has been copied to clipboard" % ea)
elif self.action == ACTION_HX_COPYNAME:
name = idaapi.get_highlight(idaapi.get_current_viewer())[0]
highlight = idaapi.get_highlight(idaapi.get_current_viewer())
name = highlight[0] if highlight else None
if name:
copy_to_clip(name)
print("%s has been copied to clipboard" % name)
Expand Down Expand Up @@ -553,4 +554,3 @@ def term(self):

def PLUGIN_ENTRY():
return LazyIDA_t()

0 comments on commit f0586f1

Please sign in to comment.