From b3bd9c77afc859392cfd5afd7a7b3b1d6db7abb4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 22 Oct 2017 00:21:44 +0200 Subject: [PATCH] No changes, just declare the variable before its use Move variable declaration where it's really needed. --- src/msw/webview_ie.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 642aff1245..66944cab0a 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -897,14 +897,13 @@ bool CallEval(const wxString& code, bool wxWebViewIE::RunScript(const wxString& javascript, wxString* output) { wxCOMPtr 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"));