### Eclipse Workspace Patch 1.0
#P modules
Index: location/location.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/location/location.module,v
retrieving revision 1.79.2.4
diff -u -r1.79.2.4 location.module
--- location/location.module	12 Mar 2007 22:08:07 -0000	1.79.2.4
+++ location/location.module	24 May 2007 06:43:49 -0000
@@ -836,6 +836,11 @@
         
     case 'insert':
     case 'update':
+      //return safely without error in case node is populated by hand
+      if (empty($node->locations)) {
+        return;
+      }
+      
       // handy to have these field names later
       $location_fields = array();
       $required_fields = array();
