diff --git a/includes/flag.views.inc b/includes/flag.views.inc
index 7b98595..3110e74 100644
--- a/includes/flag.views.inc
+++ b/includes/flag.views.inc
@@ -160,35 +160,38 @@ function flag_views_data_alter(&$data) {
     $flag = flag_flag::factory_by_content_type($flag_type);
     $info = $flag->get_views_info();
 
-    // Add the flag relationship.
-    $data[$info['views table']]['flag_content_rel'] = array(
-      'group' => t('Flags'),
-      'title' => $info['title'],
-      'help' => $info['help'],
-      'relationship' => array(
-        'flag type' => $flag_type,
-        'handler' => 'flag_handler_relationship_content',
-        'label' => t('flag'),
-        'base' => 'flag_content',
-        'base field' => 'content_id',
-        'relationship field' => $info['join field'],
-      ),
-    );
-
-    // Add the flag counter relationship.
-    $data[$info['views table']]['flag_count_rel'] = array(
-      'group' => t('Flags'),
-      'title' => $info['counter title'],
-      'help' => $info['counter help'],
-      'relationship' => array(
-        'flag type' => $flag_type,
-        'handler' => 'flag_handler_relationship_counts',
-        'label' => t('counter'),
-        'base' => 'flag_counts',
-        'base field' => 'content_id',
-        'relationship field' => $info['join field'],
-      ),
-    );
+    //ensure have info
+    if(!empty($info)) {
+      // Add the flag relationship.
+      $data[$info['views table']]['flag_content_rel'] = array(
+        'group' => t('Flags'),
+        'title' => $info['title'],
+        'help' => $info['help'],
+        'relationship' => array(
+          'flag type' => $flag_type,
+          'handler' => 'flag_handler_relationship_content',
+          'label' => t('flag'),
+          'base' => 'flag_content',
+          'base field' => 'content_id',
+          'relationship field' => $info['join field'],
+        ),
+      );
+
+      // Add the flag counter relationship.
+      $data[$info['views table']]['flag_count_rel'] = array(
+        'group' => t('Flags'),
+        'title' => $info['counter title'],
+        'help' => $info['counter help'],
+        'relationship' => array(
+          'flag type' => $flag_type,
+          'handler' => 'flag_handler_relationship_counts',
+          'label' => t('counter'),
+          'base' => 'flag_counts',
+          'base field' => 'content_id',
+          'relationship field' => $info['join field'],
+        ),
+      );
+    }
   }
 
   // Add a relationship for the user that flagged any type of content.
