RCS file: /cvs/drupal-contrib/contributions/modules/gmapfield/gmapfield.module,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 gmapfield.module
--- gmapfield.module	14 Dec 2008 18:49:45 -0000	1.1.2.5
+++ gmapfield.module	19 May 2009 02:36:35 -0000
@@ -431,8 +431,10 @@ function theme_gmapfield_formatter_defau
     }
     // Set up array for theming
     $gmap_array['#settings'] = $macro_array;
-    // Return themed map array
-    return theme('gmap', $gmap_array);
+    // Return themed map array only if a location exists
+    if (count($locations)) {
+      return theme('gmap', $gmap_array);
+    }
   }
   else {
     return '';
