fix NPE on edge removal
@@ -124,12 +124,20 @@ public class OEdgeDelegate implements OEdge {
public static void deleteLinks(OEdgeDelegate delegate) {
OVertexDelegate from = ((OVertexDelegate) delegate.getFrom());
+ if (from != null) {
from.detachOutgointEdge(delegate);
+ }
OVertexDelegate to = ((OVertexDelegate) delegate.getTo());
+ if (to != null) {
to.detachIncomingEdge(delegate);
+ }
+ if (from != null) {
from.save();
+ }
+ if (to != null) {
to.save();
}
+ }
@Override
public <RET> RET getProperty(String name) {
