Skip to content

Commit 1f35c1b

Browse files
hostfxr.py - Sanity check on shutdown that both _handle and _dll are still present
1 parent 61d7879 commit 1f35c1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clr_loader/hostfxr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _get_callable(self, assembly_path: StrOrPath, typename: str, function: str):
127127
return ffi.cast("component_entry_point_fn", delegate_ptr[0])
128128

129129
def shutdown(self) -> None:
130-
if self._handle is not None:
130+
if self._handle and self._dll:
131131
self._dll.hostfxr_close(self._handle)
132132
self._handle = None
133133

0 commit comments

Comments
 (0)