Skip to content

Commit 5c110ef

Browse files
committed
Avoided an IDA crash on IDA 9.3
1 parent 6bcbbc3 commit 5c110ef

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pyclassinformer/get_func_colors.py

100755100644
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
def get_chooser_data(chooser="Functions"):
1010
cri = ida_kernwin.chooser_row_info_vec_t()
11+
ida_kernwin.get_chooser_rows(cri, "Functions", 0)
12+
if cri.size() == 0:
13+
# for IDA 9.3
14+
# The version might have a bug and it crashes when calling
15+
# get_chooser_rows with GCRF_ALL
16+
# To avotid that, return None if the first line returns empty.
17+
return None
1118
ida_kernwin.get_chooser_rows(cri, chooser, ida_kernwin.GCRF_ALL)
1219
return cri
1320

0 commit comments

Comments
 (0)