Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java	(revision 18582)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java	(revision 18584)
@@ -80,5 +80,5 @@
         boolean isUploadInProgress = MainApplication.getLayerManager().getLayersOfType(OsmDataLayer.class)
                 .stream().anyMatch(OsmDataLayer::isUploadInProgress);
-        if (isUploadInProgress || oldRelation != null && oldRelation.getDataSet() != null && oldRelation.getDataSet().isLocked()) {
+        if (isUploadInProgress || (oldRelation != null && oldRelation.getDataSet() != null && oldRelation.getDataSet().isLocked())) {
             // If the dataset is locked, then we cannot change the relation. See JOSM #22024.
             // We should also avoid changing the relation if there is an upload in progress. See JOSM #22268/#22398.
