Skip to content

Commit

Permalink
Add Null check before assigning coordinateMapper
Browse files Browse the repository at this point in the history
This commit adds a null check before assigning the coordinate mapper in
the Device::init since it might already be assigned in coordinateMapper.

Fixes #1686
contributes to #62 and #127
  • Loading branch information
amartya4256 authored and fedejeanne committed Dec 19, 2024
1 parent 4621729 commit b35fc01
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2772,7 +2772,9 @@ protected void init () {
// Field initialization happens after super constructor
controlByHandle = new HashMap<>();
this.synchronizer = new Synchronizer (this);
this.coordinateSystemMapper = new SingleZoomCoordinateSystemMapper();
if (this.coordinateSystemMapper == null) {
this.coordinateSystemMapper = new SingleZoomCoordinateSystemMapper();
}
super.init ();
DPIUtil.setDeviceZoom (getDeviceZoom ());

Expand Down

0 comments on commit b35fc01

Please sign in to comment.