Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions addons/source-python/packages/source-python/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,13 @@ def __new__(cls, *args, **kwargs):
path = frame.f_code.co_filename

# Don't keep hostage instances that will never be unloaded
if not path.startswith(PLUGIN_PATH):
return self
while not path.startswith(PLUGIN_PATH):
frame = frame.f_back
if frame is None:
return self
path = frame.f_code.co_filename
if path.startswith('<frozen'):
return self

# Resolve the calling module name
try:
Expand Down