Add wxCHECK_MSG() to wxGTK RunScript() implementation too
Don't crash if RunScript() is called on a not yet created object. This is also consistent with the macOS version of the code.
This commit is contained in:
@@ -1172,6 +1172,9 @@ bool wxWebViewWebKit::RunScriptSync(const wxString& javascript, wxString* output
|
||||
|
||||
bool wxWebViewWebKit::RunScript(const wxString& javascript, wxString* output)
|
||||
{
|
||||
wxCHECK_MSG( m_web_view, false,
|
||||
wxS("wxWebView must be created before calling RunScript()") );
|
||||
|
||||
wxJSScriptWrapper wrapJS(javascript, &m_runScriptCount);
|
||||
|
||||
wxString result;
|
||||
|
Reference in New Issue
Block a user