diff --git a/wysiwyg.module b/wysiwyg.module
index c966294..17eff38 100644
--- a/wysiwyg.module
+++ b/wysiwyg.module
@@ -952,7 +952,10 @@ function wysiwyg_ui_profile_cache_set(&$profile) {
  * Clear all Wysiwyg profile caches.
  */
 function wysiwyg_profile_cache_clear() {
-  entity_get_controller('wysiwyg_profile')->resetCache();
+  if (module_exists('wysiwyg')) {
+    // Skip this if the module is not enabled as entity_get_info() returns null.
+    entity_get_controller('wysiwyg_profile')->resetCache();
+  }
   drupal_static_reset('wysiwyg_profile_load_all');
   cache_clear_all('wysiwyg_profiles', 'cache');
 }
