No changes, just declare the variable before its use

Move variable declaration where it's really needed.
This commit is contained in:
Vadim Zeitlin
2017-10-22 00:21:44 +02:00
parent d047bf2beb
commit b3bd9c77af

View File

@@ -897,14 +897,13 @@ bool CallEval(const wxString& code,
bool wxWebViewIE::RunScript(const wxString& javascript, wxString* output)
{
wxCOMPtr<IHTMLDocument2> document(GetDocument());
IDispatch* scriptDispatch = NULL;
if ( !document )
{
wxLogWarning(_("Can't run JavaScript script without a valid HTML document"));
return false;
}
IDispatch* scriptDispatch = NULL;
if ( FAILED(document->get_Script(&scriptDispatch)) )
{
wxLogWarning(_("Can't get the JavaScript"));