mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Fix: Allow nullptr callback in evaluateJavascript on Linux
The callback parameter of WebBrowserComponent::evaluateJavascript has a default value of nullptr. Updated the Linux implementation to handle this case properly by checking if the callback queue is empty before attempting to invoke the callback.
This commit is contained in:
parent
7617f6b480
commit
661e3d03e6
1 changed files with 7 additions and 1 deletions
|
|
@ -1308,12 +1308,18 @@ public:
|
|||
{
|
||||
const auto params = FromVar::convert<EvaluateJavascriptCallbackParams> (paramsIn);
|
||||
|
||||
if (! params.has_value() || evaluationCallbacks.size() == 0)
|
||||
if (! params.has_value())
|
||||
{
|
||||
jassertfalse;
|
||||
return;
|
||||
}
|
||||
|
||||
// do nothing if there are no evaluation callbacks
|
||||
if (evaluationCallbacks.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const auto result = [&]
|
||||
{
|
||||
using Error = EvaluationResult::Error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue