Skip to content

Commit

Permalink
Replace deprecated attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Still Hsu <dev@stillu.cc>
  • Loading branch information
Still34 committed Jan 11, 2022
1 parent 7b32b54 commit 2c9ae31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LazyIDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ def activate(self, ctx):
return 1

def update(self, ctx):
if ctx.form_type in (idaapi.BWN_DISASM, idaapi.BWN_DUMP):
if idaapi.IDA_SDK_VERSION >= 770:
target_attr = "widget_type"
else:
target_attr = "form_type"
if ctx.__getattr__(target_attr) in (idaapi.BWN_DISASM, idaapi.BWN_DUMP):
return idaapi.AST_ENABLE_FOR_WIDGET
else:
return idaapi.AST_DISABLE_FOR_WIDGET
Expand Down

0 comments on commit 2c9ae31

Please sign in to comment.