diff --git a/link.inc b/link.inc
index 50b6192..d9336dd 100644
--- a/link.inc
+++ b/link.inc
@@ -17,6 +17,17 @@ function _link_process(&$item, $delta = 0, $field, $node) {
   // Trim whitespace from URL.
   $item['url'] = trim($item['url']);
 
+  // Don't save an invalid default value (e.g. 'http://').
+  if ((isset($field['widget']['default_value'][$delta]['url']) && $item['url'] == $field['widget']['default_value'][$delta]['url']) && is_object($node)) {
+    if (!link_validate_url($item['url'])) {
+      unset($item['url']);
+    }
+  }
+
+  if (!isset($item['url'])) {
+    return;
+  }
+
   // if no attributes are set then make sure $item['attributes'] is an empty array - this lets $field['attributes'] override it.
   if (empty($item['attributes'])) {
     $item['attributes'] = array();
@@ -24,13 +35,6 @@ function _link_process(&$item, $delta = 0, $field, $node) {
 
   // Serialize the attributes array.
   $item['attributes'] = serialize($item['attributes']);
-
-  // Don't save an invalid default value (e.g. 'http://').
-  if ((isset($field['widget']['default_value'][$delta]['url']) && $item['url'] == $field['widget']['default_value'][$delta]['url']) && is_object($node)) {
-    if (!link_validate_url($item['url'])) {
-      unset($item['url']);
-    }
-  }
 }
 
 function _link_validate(&$item, $delta, $field, $node, &$optional_field_found) {
