diff --git a/config_perms.module b/config_perms.module
index a7a7603..6cb2683 100755
--- a/config_perms.module
+++ b/config_perms.module
@@ -15,10 +15,11 @@
  * Load all permissions
  */
 function config_perms_perms($machine_name = NULL, $rebuild = FALSE) {
-  // Load current perms
-  $perms = cache_get('config_perms');
+  // Load current perms.
+  $cache_obj = cache_get('config_perms');
+  $perms = (is_object($cache_obj) && isset($cache_obj->data)) ? $cache_obj->data : false;
 
-  // Rebuild if not there
+  // Rebuild if not there.
   if (!$perms || $rebuild) {
     $perms = config_perms_cache_rebuild();
   }
