Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2019-08-26 03:22:25 -0400
committerNiraj Modi2019-08-26 07:00:29 -0400
commita0c39f791f89844430db7edd13b5e7ffc26e9304 (patch)
treef7a54a772002a733ebba49dd12979692af524248
parent114635463a608e020339304516f1838bb95963aa (diff)
downloadeclipse.platform.swt-a0c39f791f89844430db7edd13b5e7ffc26e9304.tar.gz
eclipse.platform.swt-a0c39f791f89844430db7edd13b5e7ffc26e9304.tar.xz
eclipse.platform.swt-a0c39f791f89844430db7edd13b5e7ffc26e9304.zip
Bug 550423 - Crash at creation of Combo SWT.READ_ONLY
Change-Id: I9f3dfb97313489b2327cec628df6ab84f4cd4495 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 311eacfae8..8f065ee29c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -1524,6 +1524,12 @@ public void paste () {
void stateFlagsAdd(int flags) {
final long tagCBoxPtr = OS.GetWindowLongPtr(handle, 0);
+ /*
+ * Bug 550423: When non-XP-theme COMMCTL32.DLL gets loaded, undocumented
+ * internal data is not there. We do not support that and in such case
+ * GetWindowLongPtr function fails and return zero.
+ */
+ if (tagCBoxPtr == 0) return;
final long stateFlagsPtr = tagCBoxPtr + stateFlagsOffset;
int stateFlags[] = new int[1];
@@ -1539,6 +1545,12 @@ void stateFlagsAdd(int flags) {
*/
boolean stateFlagsTest() {
final long tagCBoxPtr = OS.GetWindowLongPtr(handle, 0);
+ /*
+ * Bug 550423: When non-XP-theme COMMCTL32.DLL gets loaded, undocumented
+ * internal data is not there. We do not support that and in such case
+ * GetWindowLongPtr function fails and return zero.
+ */
+ if (tagCBoxPtr == 0) return false;
final long stateFlagsPtr = tagCBoxPtr + stateFlagsOffset;
int stateFlags[] = new int[1];

Back to the top