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:
parent
18489bb7d7
commit
f16a430f08
2 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue