Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRĂ¼diger Herrmann2016-07-08 21:44:13 +0000
committerNiraj Modi2016-07-13 10:10:28 +0000
commit821894dfe6eae1e8f7260e3f091497bf94c115e0 (patch)
tree51d6e288ca45e75d1253c21e8c3cdf11893e79f1 /bundles/org.eclipse.swt/Eclipse SWT Browser
parent58785f3c1a398fa28a58028b3dbb1160b85f86db (diff)
downloadeclipse.platform.swt-821894dfe6eae1e8f7260e3f091497bf94c115e0.tar.gz
eclipse.platform.swt-821894dfe6eae1e8f7260e3f091497bf94c115e0.tar.xz
eclipse.platform.swt-821894dfe6eae1e8f7260e3f091497bf94c115e0.zip
Bug 433526: [Browser] browser.getText() is throwing exception after Internet Explorer 11 install
Asking IE11 to return the page source via getText() may cause an exception if the page is not (fully) loaded yet. The fix is to check if pVarResult is VT_NULL and return an empty string in this case. Change-Id: I80c793834fa6d86e5974423d6b9db909396aaa75 Signed-off-by: RĂ¼diger Herrmann <ruediger.herrmann@gmx.de>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Browser')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
index 9e6ea61cab..2d45f07d13 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
@@ -1278,7 +1278,7 @@ public String getText() {
}
pVarResult = document.getProperty(rgdispid[0]);
document.dispose();
- if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY) {
+ if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY || pVarResult.getType() == COM.VT_NULL) {
if (pVarResult != null) pVarResult.dispose ();
return ""; //$NON-NLS-1$
}

Back to the top