diff --git a/dcss.module b/dcss.module
index 71a44c9..e4766d6 100644
--- a/dcss.module
+++ b/dcss.module
@@ -142,11 +142,12 @@ function dcss_vars($in_theme = NULL, $reset = FALSE) {
     // Build up the dcss variables for all themes
     $theme_lineage = dcss_theme_lineage($in_theme);
     foreach ($theme_lineage as $theme => $theme_name) {
+      $dcss_theme_settings = array();
       $theme_settings = theme_get_settings($theme);
       if (empty($theme_settings['dcss'])) {
         $dcss_theme_settings = $theme_defaults[$theme];
       }
-      else {
+      elseif (!empty($theme_settings['dcss'])) {
         $dcss_theme_settings = $theme_settings['dcss'];
       }
       foreach ($dcss_theme_settings as $var => $value) {
