diff --git a/styles.module b/styles.module
index ade41d4..71a54e1 100644
--- a/styles.module
+++ b/styles.module
@@ -18,6 +18,13 @@ if(!function_exists('get_called_class')) {
  */
 function styles_field_formatter_info() {
   $info = array();
+
+  // Check for whether this is being executed during registry_update() from
+  // within an installation profile *before* the schema has been created.
+  if (drupal_installation_attempted() && !db_table_exists('media_types')) {
+    return $info;
+  }
+
   foreach (styles_default_styles() as $field_type => $styles) {
     foreach ($styles['styles'] as $style) {
       $style_name = $style['name'];
