Index: geouser.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geouser/geouser.module,v
retrieving revision 1.24
diff -u -r1.24 geouser.module
--- geouser.module	26 Feb 2009 07:08:35 -0000	1.24
+++ geouser.module	23 Oct 2009 20:28:36 -0000
@@ -165,7 +165,9 @@
 
       $location = GeoUser::getGeoCity(ip_address());
       $countryName = $location->countryName;
-      $regionName = GeoUser::getRegionName($location);
+      if ($location) {
+        $regionName = GeoUser::getRegionName($location);    
+      }
       $cityName = $location->city;
        
       $row = db_affected_rows(db_query("SELECT addr FROM {geouser} WHERE uid = %d", $user->uid));

