[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef3d-commits] r562 - trunk/org.eclipse.draw3d/src/java/org/eclipse/draw3d

Author: jvonpilgrim
Date: 2011-04-14 08:49:29 -0400 (Thu, 14 Apr 2011)
New Revision: 562

Modified:
   trunk/org.eclipse.draw3d/src/java/org/eclipse/draw3d/PolylineConnection3D.java
Log:
bug 342830, fixed

Modified: trunk/org.eclipse.draw3d/src/java/org/eclipse/draw3d/PolylineConnection3D.java
===================================================================
--- trunk/org.eclipse.draw3d/src/java/org/eclipse/draw3d/PolylineConnection3D.java	2011-04-02 11:18:45 UTC (rev 561)
+++ trunk/org.eclipse.draw3d/src/java/org/eclipse/draw3d/PolylineConnection3D.java	2011-04-14 12:49:29 UTC (rev 562)
@@ -371,7 +371,9 @@
 		if (anchor == startAnchor) {
 			return;
 		}
-		if (!(anchor instanceof ConnectionAnchor3D)) {
+		// Anchor needs an 3D owner, in case that anchor is not null. The
+		// later only occurs if a connection is removed, see bug 342830
+		if (!(anchor instanceof ConnectionAnchor3D) && anchor!=null) {
 			if (Figure3DHelper.getAncestor3D(anchor.getOwner()) == null) {
 				throw new IllegalArgumentException(
 					"Cannot set 2D anchor w/o available 3D owner, you probably"
@@ -419,7 +421,9 @@
 		if (anchor == endAnchor) {
 			return;
 		}
-		if (!(anchor instanceof ConnectionAnchor3D)) {
+		// Anchor needs an 3D owner, in case that anchor is not null. The
+		// later only occurs if a connection is removed, see bug 342830
+		if (!(anchor instanceof ConnectionAnchor3D) && anchor!=null) {
 			if (Figure3DHelper.getAncestor3D(anchor.getOwner()) == null) {
 				throw new IllegalArgumentException(
 					"Cannot set 2D anchor w/o available 3D owner, you probably"