Skip to content

Commit 63c3b34

Browse files
committed
Add support for JOSM r18686 (core now calls the same function, which will result in an IOOBE)
Signed-off-by: Taylor Smock <tsmock@meta.com>
1 parent b92f8ff commit 63c3b34

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/dialog/MapillaryFilterDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import javax.swing.JSpinner;
3939
import javax.swing.SpinnerNumberModel;
4040

41+
import org.openstreetmap.josm.data.Version;
4142
import org.openstreetmap.josm.data.imagery.vectortile.mapbox.MVTTile;
4243
import org.openstreetmap.josm.data.osm.INode;
4344
import org.openstreetmap.josm.data.osm.IPrimitive;
@@ -562,7 +563,7 @@ public void destroy() {
562563
if (!destroyed) {
563564
super.destroy();
564565
this.destroyable.fireEvent(Destroyable::destroy);
565-
if (MainApplication.getMap() != null) {
566+
if (MainApplication.getMap() != null && Version.getInstance().getVersion() < 18686) {
566567
MainApplication.getMap().removeToggleDialog(this);
567568
}
568569
OrganizationRecord.removeOrganizationListener(this);

src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ImageInfoPanel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import javax.swing.JPanel;
2626
import javax.swing.SpinnerNumberModel;
2727

28+
import org.openstreetmap.josm.data.Version;
2829
import org.openstreetmap.josm.data.osm.DataSelectionListener;
2930
import org.openstreetmap.josm.data.osm.INode;
3031
import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -322,7 +323,7 @@ private void selectedImageChanged(@Nullable INode oldImage, @Nullable INode newI
322323
public void destroy() {
323324
if (!destroyed) {
324325
super.destroy();
325-
if (MainApplication.getMap() != null)
326+
if (MainApplication.getMap() != null && Version.getInstance().getVersion() < 18686)
326327
MainApplication.getMap().removeToggleDialog(this);
327328
destroyed = true;
328329
}

0 commit comments

Comments
 (0)