mirror of
https://github.com/cemu-project/idapython.git
synced 2025-02-04 20:46:32 +01:00
kernwin.i: Added workaround for Choose() sometimes crashing with non-modal choosers
This commit is contained in:
parent
97213fabb4
commit
caecd08a77
@ -243,6 +243,12 @@ class Choose:
|
||||
|
||||
self.width = -1
|
||||
|
||||
# HACK: Add a circular reference for non-modal choosers. This prevents the GC
|
||||
# from collecting the class object the callbacks need. Unfortunately this means
|
||||
# that the class will never be collected, unless refhack is set to None explicitly.
|
||||
if (flags & 2) == 0:
|
||||
self.refhack = self
|
||||
|
||||
def sizer(self):
|
||||
"""
|
||||
Callback: sizer - returns the length of the list
|
||||
|
Loading…
x
Reference in New Issue
Block a user