--- /sites/all/modules/rgs_general/rgs_general (original).module
+++ /sites/all/modules/rgs_general/rgs_general.module
@@ -326,24 +326,26 @@
   // Make sure we only alter the right form. Let's check the attached node id
   // and see if it really a webform.
   // See http://drupal.org/node/1379384#comment-5861290
-  if(isset($form['#node']) && $form['#node']->nid == variable_get('rgs_general_webform_id') && isset($form_state['build_info']['base_form_id'] ) && $form_state['build_info']['base_form_id'] == 'webform_client_form') {
-    // correct the redirect path depending on the language...
-    if (module_exists('i18n')){
-      $nodepath = $form['#node']->webform['redirect_url'];
-      $languagepaths = translation_path_get_translations($nodepath);
-      global $language;
-      $path = $languagepaths[$language->language];
-      $form['#node']->webform['redirect_url'] = $path;
-    }
-
-    // disable the 'status' selector because this can only be changed by admins..
-    $form['submitted']['status']['#disabled'] = TRUE; 
-    
-    // Change the text on the button of the webform
-    $form['actions']['submit']['#value'] = t('Submit this booking');
-
-    // Simply add the additional validate handler.
-    $form['#validate'][] = '_rgs_validate_booking';
+  if(isset($form['#node']->nid)) {
+    if(isset($form['#node']) && $form['#node']->nid == variable_get('rgs_general_webform_id') && isset($form_state['build_info']['base_form_id'] ) && $form_state['build_info']['base_form_id'] == 'webform_client_form') {
+      // correct the redirect path depending on the language...
+      if (module_exists('i18n')){
+        $nodepath = $form['#node']->webform['redirect_url'];
+        $languagepaths = translation_path_get_translations($nodepath);
+        global $language;
+        $path = $languagepaths[$language->language];
+        $form['#node']->webform['redirect_url'] = $path;
+      }
+  
+      // disable the 'status' selector because this can only be changed by admins..
+      $form['submitted']['status']['#disabled'] = TRUE; 
+      
+      // Change the text on the button of the webform
+      $form['actions']['submit']['#value'] = t('Submit this booking');
+  
+      // Simply add the additional validate handler.
+      $form['#validate'][] = '_rgs_validate_booking';
+    }
   }
   if($form_id=='availability_calendar_booking_formlet_form') {
     // change the text on the submit button of the formlet...
