diff --git a/uw_cfg_common.module b/uw_cfg_common.module
index e2ec14735d34b8d92e1d591c945fb91d016e3712..7f14a5fced05883605df935b5fc2b516f3bcc4c8 100644
--- a/uw_cfg_common.module
+++ b/uw_cfg_common.module
@@ -770,6 +770,7 @@ function uw_cfg_common_preprocess_responsive_image(&$variables) {
     // If we are on a contact image, remove all styles
     // but those for portraits.
     if (
+      isset($media_lib_parameters['bundle']) &&
       $media_lib_parameters['bundle'] == 'uw_ct_contact' ||
       end($current_path_parts) == 'uw_ct_contact'
     ) {