--- user_relationship_node_access.module.orig	2009-07-01 13:18:00.000000000 +0200
+++ user_relationship_node_access.module	2009-07-01 13:19:10.000000000 +0200
@@ -92,11 +92,12 @@ function _user_relationship_node_access_
  */
 function user_relationship_node_access_form_alter(&$form, $form_state, $form_id) {
   global $user;
-  if ($form['#node'] && ($form['#node']->uid != $user->uid)) {
+  if (isset($form['#node']) && $form['#node'] && ($form['#node']->uid != $user->uid)) {
     return;
   }
 
   if (
+    !isset($form['type']) ||
     is_null($form['type']) ||
     $form['type']['#value'] .'_node_form' != $form_id ||
     !count($types = user_relationships_types_load())
@@ -372,4 +373,4 @@ function _user_relationship_node_access_
     }
   }
   return $allowed_grants;
-}
\ No newline at end of file
+}
