Line 27 of styles.theme.inc is referencing $variables['instance'] as an object shortly before checking $variables['instance'] to determine whether to render anything. This line should really be moved inside the if statement to prevent problems with accessing a non object when instance is not set correctly.

function template_preprocess_styles(&$variables) {
  // If we have a Styles object instance already, then honor that.
  // Otherwise, we'll build a new Styles object instance from our settings.
  $variables['instance'] = $variables['instance'] ? $variables['instance'] : styles_instance($variables);

  // Add the style name to the wrapper's classes array.
  $variables['instance']->arrayPush('classes', $variables['style_name']);

  if ($variables['instance']) {
    // Prefix and suffix are for the wrapper, such as div or span.
    $variables['prefix'] = $variables['instance']->getPrefix();
    $variables['suffix'] = $variables['instance']->getSuffix();

    // Render the output for the template file.
    $variables['output'] = $variables['instance']->display(TRUE);
  }
  else {
    // We have no instance, thus nothing to output.
    $variables['output'] = '';
  }
}