Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 16047)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 16048)
@@ -1534,4 +1534,12 @@
             innerWays.retainAll(selectedWays);
 
+            if (!innerWays.isEmpty() && selectedWays.contains(outerWay)) {
+                // see #18744
+                new Notification(tr("Cannot join inner and outer ways of a multipolygon"))
+                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
+                        .show();
+                return null;
+            }
+
             if (processedOuterWays.contains(outerWay)) {
                 new Notification(
