Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2011-05-11 18:59:53 +0000
committerLakshmi Shanmugam2011-05-11 18:59:53 +0000
commita99d0f7512ef64a51e058b97dfb32c83f03879ac (patch)
tree445c5f5096e8426e43d68204427118e692f20d82 /bundles/org.eclipse.swt/Eclipse SWT WebKit
parentee1312c0a8bceb260836539216b0ab2d958157e2 (diff)
downloadeclipse.platform.swt-a99d0f7512ef64a51e058b97dfb32c83f03879ac.tar.gz
eclipse.platform.swt-a99d0f7512ef64a51e058b97dfb32c83f03879ac.tar.xz
eclipse.platform.swt-a99d0f7512ef64a51e058b97dfb32c83f03879ac.zip
Bug 344878-Unprotected call to PrintDlg in WebUIDelegate.printFrame
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java
index de5a81ade6..7f9ee9c497 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java
@@ -240,7 +240,7 @@ int printFrame (int /*long*/ webView, int /*long*/ frame) {
PRINTDLG pd = new PRINTDLG ();
pd.lStructSize = PRINTDLG.sizeof;
pd.Flags = OS.PD_RETURNDC;
- OS.PrintDlg (pd);
+ if (!OS.PrintDlg (pd)) return COM.S_OK;
int /*long*/ printDC = pd.hDC;
int /*long*/[] result = new int /*long*/[1];
@@ -254,7 +254,7 @@ int printFrame (int /*long*/ webView, int /*long*/ frame) {
hr = privateFrame.getPrintedPageCount (printDC, count);
if (hr != COM.S_OK || count[0] == 0) {
privateFrame.Release ();
- return COM.S_OK;
+ return COM.S_OK;
}
int pageCount = count[0];
String jobName = null;

Back to the top