mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
FileChooser: Store strong reference to Native instance inside async callback
This commit is contained in:
parent
cd981c1b1a
commit
9730cd2808
1 changed files with 3 additions and 1 deletions
|
|
@ -107,6 +107,8 @@ public:
|
|||
[intents addObject: fileAccessIntent];
|
||||
}
|
||||
|
||||
auto strong = shared_from_this();
|
||||
|
||||
[fileCoordinator coordinateAccessWithIntents: intents queue: [NSOperationQueue mainQueue] byAccessor: ^(NSError* err)
|
||||
{
|
||||
if (err != nil)
|
||||
|
|
@ -148,7 +150,7 @@ public:
|
|||
result.add (std::move (juceUrl));
|
||||
}
|
||||
|
||||
passResultsToInitiator (std::move (result));
|
||||
strong->passResultsToInitiator (std::move (result));
|
||||
}];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue