mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
ModalCallbackFunction: Use NullCheckedInvocation helper to fix potential crash due to calling null std::function
This commit is contained in:
parent
a62f0f91d6
commit
88d2edf189
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ public:
|
|||
struct Callable : public ModalComponentManager::Callback
|
||||
{
|
||||
explicit Callable (CallbackFn&& f) : fn (std::forward<CallbackFn> (f)) {}
|
||||
void modalStateFinished (int result) override { fn (result); }
|
||||
void modalStateFinished (int result) override { NullCheckedInvocation::invoke (std::move (fn), result); }
|
||||
|
||||
std::remove_reference_t<CallbackFn> fn;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue