Skip to content

Commit a0fc6b6

Browse files
committed
Add Null check before assigning coordinateMapper
This commit adds a null check before assigning the coordinate mapper in the Device::init since it might already be assigned in coordinateMapper. Fixes eclipse-platform#1686 contributes to eclipse-platform#62 and eclipse-platform#127
1 parent 62ad8d9 commit a0fc6b6

File tree

1 file changed

+3
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+3
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2772,7 +2772,9 @@ protected void init () {
27722772
// Field initialization happens after super constructor
27732773
controlByHandle = new HashMap<>();
27742774
this.synchronizer = new Synchronizer (this);
2775-
this.coordinateSystemMapper = new SingleZoomCoordinateSystemMapper();
2775+
if (this.coordinateSystemMapper == null) {
2776+
this.coordinateSystemMapper = new SingleZoomCoordinateSystemMapper();
2777+
}
27762778
super.init ();
27772779
DPIUtil.setDeviceZoom (getDeviceZoom ());
27782780

0 commit comments

Comments
 (0)