Skip to content

Commit

Permalink
ModalCallbackFunction: Fix crash due to dangling reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ed95 committed Jul 22, 2021
1 parent cf79cc4 commit 3d4d0ca
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -178,7 +178,7 @@ class JUCE_API ModalCallbackFunction
explicit Callable (CallbackFn&& f) : fn (std::forward<CallbackFn> (f)) {}
void modalStateFinished (int result) override { fn (result); }

CallbackFn fn;
std::remove_reference_t<CallbackFn> fn;
};

return new Callable (std::forward<CallbackFn> (fn));
Expand Down

0 comments on commit 3d4d0ca

Please sign in to comment.