No changes, just declare the variable before its use
Move variable declaration where it's really needed.
This commit is contained in:
@@ -897,14 +897,13 @@ bool CallEval(const wxString& code,
|
|||||||
bool wxWebViewIE::RunScript(const wxString& javascript, wxString* output)
|
bool wxWebViewIE::RunScript(const wxString& javascript, wxString* output)
|
||||||
{
|
{
|
||||||
wxCOMPtr<IHTMLDocument2> document(GetDocument());
|
wxCOMPtr<IHTMLDocument2> document(GetDocument());
|
||||||
IDispatch* scriptDispatch = NULL;
|
|
||||||
|
|
||||||
if ( !document )
|
if ( !document )
|
||||||
{
|
{
|
||||||
wxLogWarning(_("Can't run JavaScript script without a valid HTML document"));
|
wxLogWarning(_("Can't run JavaScript script without a valid HTML document"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IDispatch* scriptDispatch = NULL;
|
||||||
if ( FAILED(document->get_Script(&scriptDispatch)) )
|
if ( FAILED(document->get_Script(&scriptDispatch)) )
|
||||||
{
|
{
|
||||||
wxLogWarning(_("Can't get the JavaScript"));
|
wxLogWarning(_("Can't get the JavaScript"));
|
||||||
|
Reference in New Issue
Block a user