1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Windows: Fix potential accessibility related leaks

This commit is contained in:
attila 2023-05-19 16:38:51 +02:00 committed by Attila Szarvas
parent 18489bb7d7
commit f16a430f08
2 changed files with 4 additions and 4 deletions

View file

@ -93,12 +93,12 @@ public:
if (isPositiveAndBelow (column->begin, children.size()))
{
IRawElementProviderSimple* provider = nullptr;
ComSmartPtr<IRawElementProviderSimple> provider;
if (auto* child = children[(size_t) column->begin])
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
if (child->getNativeImplementation()->QueryInterface (IID_PPV_ARGS (&provider)) == S_OK && provider != nullptr)
if (child->getNativeImplementation()->QueryInterface (IID_PPV_ARGS (provider.resetAndGetPointerAddress())) == S_OK && provider != nullptr)
{
*pRetVal = SafeArrayCreateVector (VT_UNKNOWN, 0, 1);
LONG index = 0;

View file

@ -99,11 +99,11 @@ public:
for (const auto& child : children)
{
IRawElementProviderSimple* provider = nullptr;
ComSmartPtr<IRawElementProviderSimple> provider;
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
if (child != nullptr)
child->getNativeImplementation()->QueryInterface (IID_PPV_ARGS (&provider));
child->getNativeImplementation()->QueryInterface (IID_PPV_ARGS (provider.resetAndGetPointerAddress()));
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
if (provider == nullptr)