Author: michiel
Date: 2010-06-28 15:58:03 +0200 (Mon, 28 Jun 2010)
New Revision: 42731

Modified:
   
mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/implementation/VirtualNode.java
Log:
avoid npe

Modified: 
mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/implementation/VirtualNode.java
===================================================================
--- 
mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/implementation/VirtualNode.java
     2010-06-28 10:17:37 UTC (rev 42730)
+++ 
mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/implementation/VirtualNode.java
     2010-06-28 13:58:03 UTC (rev 42731)
@@ -178,7 +178,11 @@
         final Field field;
         public NodeAndField(Node n, String f) {
             node = n;
-            field = node.getNodeManager().getField(f);
+            if (node != null && f != null ) {
+                field = node.getNodeManager().getField(f);
+            } else {
+                field = null;
+            }
         }
 
     }
@@ -199,10 +203,10 @@
                 } catch (NotFoundException nfe) {
                     // don't know when this happens, perhaps the node was 
deleted in the mean time?
                     log.debug(nfe.getMessage());
-                    return null;
+                    return new NodeAndField(this, fieldName);
                 }
             } else {
-                return null;
+                return new NodeAndField(this, fieldName);
             }
         } else {
             return new NodeAndField(this, fieldName);

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to