diff --git a/CHANGES.md b/CHANGES.md
index 40baa999bd2b48fdd6dcffd4b5dc2b413acb1e7f..470082d316dab970dcddc3b040bbc13f703e2718 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,7 @@ Changes
 
 ### Unreleased
 
+* 2019-05-29 - Check existence of property blockcolumnwidth before accessing it.
 * 2019-05-29 - Login background image did not fill the page completely when browser window was really low but really wide.
 * 2019-05-27 - Added multilanguage filtering to the login background image texts.
 * 2019-05-24 - Prevent back-to-top button from being printed.
diff --git a/lib.php b/lib.php
index 05ce1fe6cbd2994425db3113be113cbf24e5f4bb..22c3031d58f968b1c4fdd0d0d4b1cb1b0ebb43a9 100644
--- a/lib.php
+++ b/lib.php
@@ -120,15 +120,19 @@ function theme_boost_campus_get_pre_scss($theme) {
 
     // MODIFICATION START: Overwrite Boost core SCSS variables which need units and thus couldn't be added to $configurable above.
     // Set variables which are processed in the context of the blockcolumnwidth setting.
-    $scss .= '$blocks-column-width: ' . $theme->settings->blockcolumnwidth . "px;\n";
-    $scss .= '$grid-gutter-width: '. "30px;\n";
+    if (isset($theme->settings->blockcolumnwidth)) {
+        $scss .= '$blocks-column-width: ' . $theme->settings->blockcolumnwidth . "px;\n";
+        $scss .= '$grid-gutter-width: ' . "30px;\n";
+    }
     // MODIFICATION END.
 
     // MODIFICATION START: Set own SCSS variables which need units or calculations and thus couldn't be
     // added to $configurable above.
     // Set variables which are processed in the context of the blockcolumnwidth setting.
-    $scss .= '$blocks-column-width-dashboard: ' . $theme->settings->blockcolumnwidthdashboard . "px;\n";
-    $scss .= '$blocks-plus-gutter-dashboard: $blocks-column-width-dashboard + ( $grid-gutter-width / 2 )' . ";\n";
+    if (isset($theme->settings->blockcolumnwidthdashboard)) {
+        $scss .= '$blocks-column-width-dashboard: ' . $theme->settings->blockcolumnwidthdashboard . "px;\n";
+        $scss .= '$blocks-plus-gutter-dashboard: $blocks-column-width-dashboard + ( $grid-gutter-width / 2 )' . ";\n";
+    }
     // MODIFICATION END.
 
     // MODIFICATION START: Add login background images that are uploaded to the setting 'loginbackgroundimage' to CSS.