Skip to content

Commit

Permalink
Update monkey patches
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonarddeR committed Aug 27, 2024
1 parent bb8975f commit 7660567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/monkeyPatches/comtypesMonkeyPatches.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2009-2019 NV Access Limited, Babbage B.V.
# Copyright (C) 2009-2024 NV Access Limited, Babbage B.V., Leonard de Ruijter
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.

Expand Down Expand Up @@ -150,7 +150,7 @@ def replace_cpb_del() -> None:
# Work around an issue with comtypes where __del__ seems to be called twice on COM pointers.
# This causes Release() to be called more than it should,
# which is very nasty and will eventually cause us to access pointers which have been freed.
from comtypes import _compointer_base
from comtypes._post_coinit.unknwn import _compointer_base

_compointer_base._oldCpbDel = _compointer_base.__del__
_compointer_base.__del__ = newCpbDel
Expand Down

0 comments on commit 7660567

Please sign in to comment.