diff --git a/xmlsitemap.module b/xmlsitemap.module
index 93e935f..cb909c9 100644
--- a/xmlsitemap.module
+++ b/xmlsitemap.module
@@ -968,11 +968,12 @@ function xmlsitemap_get_link_info($type = NULL, $reset = FALSE) {
 function xmlsitemap_get_link_type_enabled_bundles($entity_type) {
   $bundles = array();
   $info = xmlsitemap_get_link_info($entity_type);
-  foreach ($info['bundles'] as $bundle => $bundle_info) {
-    $settings = xmlsitemap_link_bundle_load($entity_type, $bundle);
-    if (!empty($settings['status'])) {
-    //if (!empty($bundle_info['xmlsitemap']['status'])) {
-      $bundles[] = $bundle;
+  if(!empty($info)) {
+    foreach ($info['bundles'] as $bundle => $bundle_info) {
+      $settings = xmlsitemap_link_bundle_load($entity_type, $bundle);
+      if (!empty($settings['status'])) {
+        $bundles[] = $bundle;
+      }
     }
   }
   return $bundles;
